You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Juraj Lonc (JIRA)" <ji...@apache.org> on 2014/05/13 12:15:16 UTC

[jira] [Comment Edited] (PDFBOX-2077) Empty (invalid) DecodeParms is added to image

    [ https://issues.apache.org/jira/browse/PDFBOX-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13996241#comment-13996241 ] 

Juraj Lonc edited comment on PDFBOX-2077 at 5/13/14 10:14 AM:
--------------------------------------------------------------

{noformat}
PDDocument pdDoc=PDDocument.load(f);
PDPage pdPage=(PDPage)pdDoc.getDocumentCatalog().getAllPages().get(0);

PDResources res=pdPage.findResources();
// this is the guilty line
res.getXObjects();
	
File fout=new File("resaved.pdf");
pdDoc.save(fout);
{noformat}


was (Author: chupacabras):
DDocument pdDoc=PDDocument.load(f);
		PDPage pdPage=(PDPage)pdDoc.getDocumentCatalog().getAllPages().get(0);
		
		
		PDResources res=pdPage.findResources();
		// this is the guilty line
		res.getXObjects();
		
		File fout=new File("resaved.pdf");
		pdDoc.save(fout);


> Empty (invalid) DecodeParms is added to image
> ---------------------------------------------
>
>                 Key: PDFBOX-2077
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2077
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: Juraj Lonc
>         Attachments: input_image.pdf, resaved.pdf
>
>
> PDF contains image (xobject), it as no "/DecodeParms".
> PDFBox adds empty "/DecodeParms" to this image which results to invalid PDF and Adobe reader complains about it.
> Problem is caused by calling PDResources.getXObjects().
> It is very similar to PDFBOX-2042



--
This message was sent by Atlassian JIRA
(v6.2#6252)