You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2016/03/31 19:25:25 UTC

[jira] [Resolved] (PDFBOX-3299) TIFF-files with FillOrder=2 can't be converted to PDF

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

Tilman Hausherr resolved PDFBOX-3299.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.1.0
                   2.0.1
                   1.8.12

Thanks for the detailed report. I'm sorry that the result is just a "you can't do that" fix. If you need any help re: tiff files / ccitt compression of b/w images, please ask on the mailing list and I'll be glad to help.

> TIFF-files with FillOrder=2 can't be converted to PDF
> -----------------------------------------------------
>
>                 Key: PDFBOX-3299
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3299
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Rendering
>    Affects Versions: 1.8.10, 1.8.11, 2.0.0, 2.0.1, 2.1.0
>            Reporter: Christofer
>            Assignee: Tilman Hausherr
>             Fix For: 1.8.12, 2.0.1, 2.1.0
>
>
> I have issues with some TIFF-files that has the tag FillOrder=2 resulting in a corrupt PDF when trying to convert them with PDFBox. There's no warning or anything, but the resulting PDF can't be viewed.
> Example code to reproduce:
> {code}
> import org.apache.pdfbox.pdmodel.PDDocument;
> import org.apache.pdfbox.pdmodel.PDPage;
> import org.apache.pdfbox.pdmodel.PDPageContentStream;
> import org.apache.pdfbox.pdmodel.common.PDRectangle;
> import org.apache.pdfbox.pdmodel.graphics.image.CCITTFactory;
> import org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject;
> import java.io.File;
> import java.io.IOException;
> public class TiffFillOrder {
> 	public static void main(String[] args) throws IOException {
> 		PDDocument document = new PDDocument();
> 		PDImageXObject tif = CCITTFactory.createFromFile(document, new File(args[0]));
> 		PDPage page = new PDPage();
> 		document.addPage(page);
> 		PDPageContentStream content = new PDPageContentStream(document, page, PDPageContentStream.AppendMode.APPEND, true);
> 		content.drawImage(tif, 0, 0, PDRectangle.A4.getWidth(), PDRectangle.A4.getHeight());
> 		content.close();
> 		document.save(new File(args[1]));
> 	}
> }
> {code}
> I can't attach an example since it contains personal information, but found this in another jira-issue that has the same problem: https://issues.apache.org/jira/secure/attachment/12558110/Wing.tif
> It looks like TiffFaxDecoder has support for this, but the value 1 is always sent to the constructor and the tag for fillorder (266) is never parsed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org