[
https://issues.apache.org/jira/browse/PDFBOX-771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
sri vasu updated PDFBOX-771:
----------------------------
Comment: was deleted
(was: A comment with security level 'jira-users' was removed.)
> PDF 2 Tiff conversion is not happening properly
> -----------------------------------------------
>
> Key: PDFBOX-771
> URL: https://issues.apache.org/jira/browse/PDFBOX-771
> Project: PDFBox
> Issue Type: Bug
> Components: PDFReader
> Affects Versions: 1.2.0
> Environment: software
> Reporter: sri vasu
> Attachments: PAGE000001.tif, test_.PDF
>
>
> We are trying to convert PDF to Tiff using the below code, the tiff images
> are not coming well (width is shrinking, please see the attachment of pdf
> file and converted tiff file).
> PDDocument document = PDDocument.load(pdfFile);
> List<PDPage> pages = document.getDocumentCatalog().getAllPages();
> for (int i = 0; i < pages.size(); i++) {
> PDPage page = (PDPage) pages.get(i);
> BufferedImage image = page.convertToImage(12, 300);
> // Convert this image to tiff file.
> }
> To overcome this problem I modified below code in
> 'org.apache.pdfbox.util.operator.pagedrawer.Invoke' to adjust the width and
> height.
> // My page width is always 2479
> int imageWidth = awtImage.getWidth();
> if(imageWidth > 2479) {
> imageWidth = 2479;
> }
> // My page height is always 3508
> int imageHeight = awtImage.getHeight();
> if(imageHeight > 3508) {
> imageHeight = 3508;
> }
> Now images are coming fine, it is very slow in processing, not even
> processing 25 pdfs per hour, also it has memory leaks, it uses lot of
> resources, it is killing other process with OutOfMemory errors.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.