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,767 commits into
base: trunk
Choose a base branch
from
Open

JFIF APP0 must be first marker after SOI #104

wants to merge 4,767 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]`

THausherr and others added 30 commits May 17, 2024 13:40
…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
…mpty private dict and check after the loop

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1918445 13f79535-47bb-0310-9956-ffa450edef68
THausherr and others added 30 commits January 3, 2025 11:21
…s with d1 or uncolored tiling patterns

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1922856 13f79535-47bb-0310-9956-ffa450edef68
… in PDType1CFont.getWidth(), as suggested by Andreas Lehmkühler

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1922916 13f79535-47bb-0310-9956-ffa450edef68
…, as suggested by Andreas Lehmkühler

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1922921 13f79535-47bb-0310-9956-ffa450edef68
…s is already in getCertificateSet() result

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1923255 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
Development

Successfully merging this pull request may close these issues.

3 participants