You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Maruan Sahyoun (JIRA)" <ji...@apache.org> on 2013/04/06 16:45:16 UTC

[jira] [Closed] (PDFBOX-155) sf issue Barcode is not printed

     [ https://issues.apache.org/jira/browse/PDFBOX-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maruan Sahyoun closed PDFBOX-155.
---------------------------------

    Resolution: Cannot Reproduce

Closing as the sample pdf is no longer available to reproduce the issue
                
> sf issue Barcode is not printed
> -------------------------------
>
>                 Key: PDFBOX-155
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-155
>             Project: PDFBox
>          Issue Type: Bug
>            Priority: Minor
>
> [imported from SourceForge]
> http://sourceforge.net/tracker/index.php?group_id=78314&atid=552832&aid=1474121
> Originally submitted by reno1979 on 2006-04-21 03:35.
> When printing a pdf that contains a barcode (created in
> itext) like this:
> PDdocument doc=new PDdocument("test.pdf"); 
> doc.print(); 
> The document comes out fine, except the barcodes are
> missing. Using a normal pdf reader the barcodes are
> printed.
> I will upload a barcode_test.pdf to ftp.pdfbox.org 
> Best regards,
> Rene
> sorry didn't know category or group :S
> [comment on SourceForge]
> Originally sent by lemich.
> Logged In: YES 
> user_id=1741045
> Originator: NO
> Thanks for your workaround mathd, i was looking for a way to print a barcode and it works.
> But there is still a problem : I have to display the number associated to the barcode, in fact the number used to generate it with iText.
> For example:
> Image barcode39 = null;
> //I create my BarCode :
> String baseBarCode = "12306"
> barcode=new Barcode39();
> barcode.setCode(codebarre);
> barcode.setStartStopText(false);
> //Then I create my image
> barcode39=barcode.createImageWithBarcode(cb, null, null); // this way works, but I can't print it with pdfbox
> // or the second way, which works, but the size of the barcode is not the same, and the number disappears at printing
> java.awt.Image img3 = barcode.createAwtImage(Color.BLACK, Color.WHITE);
> Did somebody have the same problem, and is there a simple way to solve it?
> For the moment, i try to found an alternative by displaying the number independantly, but it won't render the same.
> Thanks
> Michel
> [comment on SourceForge]
> Originally sent by mathd.
> Logged In: YES 
> user_id=1580577
> Originator: NO
> I have found a workaround if you are creating the original pdf yourself with iText.
> Instead of creating the barcode with createImageWithBarcode
> ex:
> Image img = code128.createImageWithBarcode(cb, null, null);
> img.setAbsolutePosition(150, 50);
> cb.addImage(img);
> I created an java.awt.Image with createAwtImage
> ex:
> java.awt.Image img3 = code128.createAwtImage(Color.BLACK, Color.WHITE);
> Image img4 = Image.getInstance(img3, null);
> img4.setAbsolutePosition(150, 50);
> cb.addImage(img4);
> That way the barcode is an image of a barcode and PDFBox can print it without problem.
> [comment on SourceForge]
> Originally sent by mathd.
> Logged In: YES 
> user_id=1580577
> Originator: NO
> I have the same problem with version 0.7.3
> But the nightly build are able to print the pdf417 font (2d barcode) but not the regular barcode.
> I am not able to upload the sample pdf to ftp.pdfbox.org so I have send you an email. If you prefer I have also upload it to http://premieresloges.ca/barcode_test2.pdf
> [comment on SourceForge]
> Originally sent by benlitchfield.
> Logged In: YES 
> user_id=601708
> Originator: NO
> I took a quick peek at the barcode_test.pdf file.  I fixed the one exception that was thrown but then ran into another error; the barcodes were not being drawn in the correct spot.  I have not had time to look at it further yet.
> Ben
> [comment on SourceForge]
> Originally sent by nobody.
> Logged In: NO 
> Any news ?
> [comment on SourceForge]
> Originally sent by smadja.
> Logged In: YES 
> user_id=1729448
> Originator: NO
> I did it.
> We stay in touch.
> Guy
> [comment on SourceForge]
> Originally sent by benlitchfield.
> Logged In: YES 
> user_id=601708
> Originator: NO
> The news is that I am looking for a sample PDF.  I don't seem to be able to find the barcode_test.pdf with my list of PDFs.  If you have a sample then please attach/upload to ftp.pdfbox.org
> Thanks,
> Ben
> [comment on SourceForge]
> Originally sent by smadja.
> Logged In: YES 
> user_id=1729448
> Originator: NO
> Hello,
> Do you have any news about this bug ?
> How can we print barcode with 0.7.3 version ?
> Thanks
> [comment on SourceForge]
> Originally sent by benlitchfield.
> Logged In: YES 
> user_id=601708
> Originator: NO
> I realize this bug has been opened for a while but for some reason I don't have the barcode_test.pdf  Can you please upload it again or if someone else has an example then please upload/attach and leave a comment here.
> Thanks,
> Ben
> [comment on SourceForge]
> Originally sent by nobody.
> Logged In: NO 
> I have also tried this and get the same results 0.7.3; 01-27-07

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira