You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "SIX Douglas (JIRA)" <ji...@apache.org> on 2012/06/19 17:21:42 UTC
[jira] [Created] (PDFBOX-1345) Set the Image DPI to include in the
PDF
SIX Douglas created PDFBOX-1345:
-----------------------------------
Summary: 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
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
[jira] [Updated] (PDFBOX-1345) Set the Image DPI to include in the
PDF
Posted by "SIX Douglas (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PDFBOX-1345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
SIX Douglas updated PDFBOX-1345:
--------------------------------
Attachment: monopage-01.tif
pdfBox-generated-doc.pdf
iText-generated-doc.pdf
Here is the image (monopage-01.tif) I want to add (it is a scanned image of a A4 page).
I've joined the PDF created using PDFBox (pdfBox-generated-doc) and the document including the same image but generated using the iText toolbox.
> 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
[jira] [Resolved] (PDFBOX-1345) Set the Image DPI to include in the
PDF
Posted by "SIX Douglas (JIRA)" <ji...@apache.org>.
[ 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