Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JFIF APP0 must be first marker after SOI #104

Open
wants to merge 4,531 commits into
base: trunk
Choose a base branch
from
Open

JFIF APP0 must be first marker after SOI #104

wants to merge 4,531 commits into from

Conversation

zengquan
Copy link

@zengquan zengquan commented Feb 5, 2021

i'm insert a picture into my template.pdf
`PDImageXObject image = PDImageXObject.createFromFile(“C:/tmp/db20dacea96841098d8b34635c8aec1e.jpg”, document);
PDPageContentStream contentStream = new PDPageContentStream(document, document.getPage(0), PDPageContentStream.AppendMode.APPEND, true);
contentStream.drawImage(image, x , y,width, height);

javax.imageio.IIOException: JFIF APP0 must be first marker after SOI
at com.sun.imageio.plugins.jpeg.JPEGMetadata.(JPEGMetadata.java:224) ~[na:1.8.0_121]
at com.sun.imageio.plugins.jpeg.JPEGImageReader.getImageMetadata(JPEGImageReader.java:1023) ~[na:1.8.0_121]
at org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory.getNumComponentsFromImageMetadata(JPEGFactory.java:213) [pdfbox-app-2.0.22.jar:2.0.22]
at org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory.retrieveDimensions(JPEGFactory.java:182) [pdfbox-app-2.0.22.jar:2.0.22]
at org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory.createFromByteArray(JPEGFactory.java:103) [pdfbox-app-2.0.22.jar:2.0.22]
at org.apache.pdfbox.pdmodel.graphics.image.JPEGFactory.createFromStream(JPEGFactory.java:85) [pdfbox-app-2.0.22.jar:2.0.22]
at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createFromFileByExtension(PDImageXObject.java:241) [pdfbox-app-2.0.22.jar:2.0.22]
at org.apache.pdfbox.pdmodel.graphics.image.PDImageXObject.createFromFile(PDImageXObject.java:202) [pdfbox-app-2.0.22.jar:2.0.22]`

Timo Boehme and others added 30 commits June 19, 2023 13:46
…y when Cap yes; remove super(); use constants; avoid useless dictionary entry

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1911426 13f79535-47bb-0310-9956-ffa450edef68
THausherr and others added 30 commits May 1, 2024 14:54
…recursion (change needed because identical integers weren't displayed)

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1917470 13f79535-47bb-0310-9956-ffa450edef68
…gParser as provided by Patrick Corless, closes #193

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1917768 13f79535-47bb-0310-9956-ffa450edef68
…rrent page so we can restore reverted commit, as suggested by Andreas Lehmkühler

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1917800 13f79535-47bb-0310-9956-ffa450edef68
…ess for PDF/A-1b; add test with PDF/A check

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1917888 13f79535-47bb-0310-9956-ffa450edef68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants