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

JFIF APP0 must be first marker after SOI #104

wants to merge 4,753 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 2, 2024 08:47
…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
THausherr and others added 30 commits December 29, 2024 09:14
…ecause that one can be a BufferedImage when printing with nonzero dpi

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1922762 13f79535-47bb-0310-9956-ffa450edef68
…ask defined in the current graphics state, as done by SehoAhn and Jonas Jenwald in PDF.js PR 19269

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1922799 13f79535-47bb-0310-9956-ffa450edef68
…ith d1 or uncolored tiling patterns

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/2.0@1922855 13f79535-47bb-0310-9956-ffa450edef68
…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
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