[
https://issues.apache.org/jira/browse/PDFBOX-771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Lehmkühler resolved PDFBOX-771.
---------------------------------------
Resolution: Fixed
Fix Version/s: 1.6.0
Assignee: Andreas Lehmkühler
Some of the XObjects contain implausible data for the row value:
Columns: 2592
Rows: 1084975104
Height: 3508
The rows value doesn't make any sense.
I fixed that in revision 1129256.
I also checked the performance. It took pdfbox round about a minute to convert
all pages into single pngs. IMO that's o.k.
> 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
> Assignee: Andreas Lehmkühler
> Fix For: 1.6.0
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira