[ https://issues.apache.org/jira/browse/PDFBOX-3214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15116711#comment-15116711 ]
Tilman Hausherr commented on PDFBOX-3214: ----------------------------------------- This is still a "how to" question and not a bug. It works as intended. The images you have attached are indeed not CCITT T4 or T6 compressed (also known as "fax 3" and "fax 4", they are LZW compressed and with more than 2 colors, so you can't use the CCITTFactory class. Instead use the LosslessFactory class, which you already do for PNG: {code} BufferedImage bim = ImageIO.read(new File(str)); pdImage = LosslessFactory.createFromImage(document, bim); {code} The reason is that the CCITTFactory class uses the existing compression to put the images inside the PDF with that compression. There's currently no way to convert to CCITT compression from a BufferedImage. This might come in the future (there is already an issue), but that one would only be for bitonal images. Please use the user mailing list https://mail-archives.apache.org/mod_mbox/pdfbox-users/ for such questions. Better, use it always, as long as you're a newbie. > When convert tiff files to pdf, i've got some error > --------------------------------------------------- > > Key: PDFBOX-3214 > URL: https://issues.apache.org/jira/browse/PDFBOX-3214 > Project: PDFBox > Issue Type: Bug > Components: Documentation > Affects Versions: 2.0.0 > Environment: Windows 10, JDK 1.7 > Reporter: Jae Soon Kim > Labels: newbie > Fix For: 2.0.0 > > Attachments: aspi32.pdf, aspi32_000.tiff, aspi32_001.tiff, > imageToPdf.java, pdfToImage.java > > > Hi. > I success to convert pdf to image(tiff, jpeg200, jpeg, png). > but when i convert some tiff files to pdf, i've got a some error message. > like this: "java.io.IOException: First image in tiff is not CCITT T4 or T6 > compressed" > I couldn't find this solution of this error message in "stackoverflow.com" > and PDFBOX issue in JIRA. > So. i attach my Java Files(pdf->image, image->pdf), TIFF image and PDF file. > Please let me know how can i resolve that message. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org