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

SIX Douglas resolved PDFBOX-1345.
---------------------------------

    Resolution: Implemented

Ok I've found the solution myself.

I'm using this :
contentStream.drawXObject(ximage, 0, 0, PDPage.PAGE_SIZE_A4.getWidth(), 
PDPage.PAGE_SIZE_A4.getHeight());

Instead of this:
contentStream.drawImage( ximage, 0, 0 );

And the image is now displayed correctly.

Sorry to have bothered you.
                
> Set the Image DPI to include in the PDF
> ---------------------------------------
>
>                 Key: PDFBOX-1345
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1345
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: PDModel
>    Affects Versions: 1.7.0
>            Reporter: SIX Douglas
>         Attachments: iText-generated-doc.pdf, monopage-01.tif, 
> pdfBox-generated-doc.pdf
>
>
> Hi,
> I try to add an Image with a 200DPI in a A4 PDF, using PDFBox. When I open 
> the PDF using Acrobat Reader, all I can see is the buttom left of the image. 
> The remaining of the image is out of the page.
> How can I add the image with a "FitToPage" option?
> Thanks,
> Douglas.

--
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

        

Reply via email to