You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Andreas Lehmkühler (Closed JIRA)" <ji...@apache.org> on 2012/01/31 17:49:10 UTC

[jira] [Closed] (PDFBOX-1057) PDXObjectImage create diferences between pdf on mac and windows

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

Andreas Lehmkühler closed PDFBOX-1057.
--------------------------------------

    Resolution: Not A Problem
      Assignee: Andreas Lehmkühler

I agree with Luke, it's not a PDFBox issue.
                
> PDXObjectImage create diferences between pdf on mac and windows
> ---------------------------------------------------------------
>
>                 Key: PDFBOX-1057
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1057
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 1.5.0
>         Environment: Mac OSx 10.6.8, java version "1.6.0_26"
>            Reporter: Jose robles
>            Assignee: Andreas Lehmkühler
>
> Hi! I hope you can help me with this, I have a pdf form, I use pdfbox to fill the fields, but also to add a barcode to the form, the barcode is generated with jbars, this generate a jpg, then I add this jpg to the pdf form,  on Mac works everything fine, but when I generate/open the same form on Windows the  barcode is distorted, I dont know whats going on, not sure If I did something wrong or is the pdfbox.
> [code]
>                 File fi = new File(codigoBarras.getPathToImg());   //the generated Codebar
> 		if(!fi.exists() || !fi.canRead()){
> 			Log.error("GenerarPoliza", "La imagen del codigo de barras no se genero correctamente.");  //the codebar didnt generate correctly
> 			codigo = false;
> 		}
> 	        PDXObjectImage ximage = null;
> 		ximage = new PDJpeg(this.pdf, new FileInputStream( fi ) );   //this.pdf is the pdf document.
> 		ximage.setWidth(toPixel(60 * pixelXmm_x));  //set the width of the image
> 		ximage.setHeight(toPixel(13 * pixelXmm_x)); //set the height of the image
> 		PDPageContentStream contentStream = new PDPageContentStream(this.pdf, pagina, true , true);
> 		contentStream.drawImage(ximage, toPixel(20.0 * pixelXmm_x), toPixel(10.0 * pixelXmm_y));  //draw the codebars to the given coordinates. 		
> 		contentStream.close();
> [/code]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira