You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "lappa-lappa (Jira)" <ji...@apache.org> on 2022/01/04 11:48:00 UTC
[jira] [Created] (PDFBOX-5355) remove page from pdf with image violate conformance level pdf1.7
lappa-lappa created PDFBOX-5355:
-----------------------------------
Summary: remove page from pdf with image violate conformance level pdf1.7
Key: PDFBOX-5355
URL: https://issues.apache.org/jira/browse/PDFBOX-5355
Project: PDFBox
Issue Type: Bug
Affects Versions: 3.0.0 JBIG2, 2.0.20
Reporter: lappa-lappa
Attachments: with_image.pdf
open [https://www.pdf-online.com/osa/validate.aspx] and upload "with_image.pdf" document, validation passed
Execute following code (update absolute paths to files):
{{byte[] withImage = readFile("C:\\r\\pdf\\with_image.pdf");}}
{{try (PDDocument boxDocument = Loader.loadPDF(withImage)) {}}
{{ boxDocument.removePage(0);}}
{{ byte[] pdfBytes = toByteArray(boxDocument);}}
{{ Files.write(Path.of("C:\\r\\pdf\\pdf_result.pdf"), pdfBytes);}}
{{} catch (IOException e) {}}
{{{} e.printS{}}}tackTrace();
{{}}}
{{upload pdf_result.pdf into [https://www.pdf-online.com/osa/validate.aspx] , validation is not passed.}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org