Description
Generating an image from PDF generated by pdfTeX-1.40.12 creates empty images (transparent images in png format, and black images in jpeg format), see pdf-nok.pdf and pdf-nok1.png files attached.
However, pdfTeX versions 1.40.10 and 1.40.13 generate pdf files that are correctly converted to images, see pdf-ok.pdf and pdf-ok1.png files attached.
The code used to generate the png files is the following:
Test.java
import java.awt.image.BufferedImage; import java.io.File; import org.apache.pdfbox.pdmodel.PDDocument; import org.apache.pdfbox.util.PDFImageWriter; public class Test { public static void main(String[] args) throws Exception { PDDocument docOk = PDDocument.load(new File("pdf-ok.pdf")); PDDocument docNok = PDDocument.load(new File("pdf-nok.pdf")); PDFImageWriter imagewriter = new PDFImageWriter(); try { imagewriter.writeImage(docOk, "png", null, 1, 1, "pdf-ok", BufferedImage.TYPE_INT_RGB, 100); imagewriter.writeImage(docNok, "png", null, 1, 1, "pdf-nok", BufferedImage.TYPE_INT_RGB, 100); } finally { docOk.close(); docNok.close(); } } }
Attachments
Attachments
Issue Links
- is related to
-
PDFBOX-1628 Type 3 Fonts are not processed by PDPage.createImage
- Closed