50,995 questions
Score of 2
1 answer
164 views
Incremental signature on an AES-encrypted PDF leaves encrypted bytes in the /Contents padding instead of zeros
I'm signing a password-protected PDF with PDFBox (version 3.0.8). I load it with the password, call addSignature, then saveIncremental, with the signature size set to 16 KB.
The signature itself is ...
Score of 2
1 answer
127 views
How to add header and footer to shiny PDF output
I have a shiny app, based on an example from the posit website. I would like to produce a pdf with a custom header and footer. I usually achieve this in markdown and quarto projects by including this ...
Score of 3
1 answer
157 views
How can Chrome’s built-in PDF viewer download button use a custom filename for an authenticated PDF?
I show a PDF from my backend in an <iframe> using Chrome's built-in PDF viewer. The endpoint requires a bearer token, so Angular fetches the PDF as a Blob and gives the iframe a blob: URL.
The ...
Score of 1
2 answers
169 views
Fillable PDF unfillable in Acrobat after being modified by PdfSharp library, but remains fillable in web browsers [closed]
I'm having trouble with the outputs of the PdfSharp library.
A new feature in my application downloads a fillable PDF from our server, fills it with information based on user input, and saves it to ...
Score of 5
2 answers
229 views
iText CCITTFaxDecode returns corrupted image when width is not multiple of 8, PDFBox works correctly
I'm investigating a problem in iText (tested with recent versions of iText Core 9.5.0+ and pdfSweep 5.0.5+ and java 21) when extracting a monochrome CCITT image from a PDF like this above:
<<
/...
Score of 2
0 answers
98 views
In-place PDF text editing with Compose Multiplatform & iText7: Font size explosion and paragraph fragmentation
I am building a PDF text editor in Kotlin Multiplatform (currently running and testing on Android).
The Architecture
Extraction (iText7): Parse the PDF with PdfCanvasProcessor, extract character ...
Score of 0
2 answers
165 views
Exporting selected HTML pages to PDF without Selenium / browser automation
I am stuck with the following challenge:
I am deploying a handbook for my students via GitHub, using the University of Delft TeachBook template. I now want my students to be able to run code (ideally ...
Score of 0
1 answer
76 views
List types (Bag, Seq, Alt) in PDF/A Extension Schemas with non-Literal Items
My starting point is this PDF/A extension schema, slightly modified:
<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#&...
Score of 0
1 answer
161 views
Merging Multiple PDF's [duplicate]
I am using the following code to test merging PDF's, and get an error "Unknown PDFException" at the line "Using pdfWriter As New PdfWriter(outputFile)"
I have the following Imports ...
Score of 1
1 answer
162 views
iText 7 copyPagesTo throws UnsupportedOperationException for a link annotation with an invalid GoTo destination
I'm merging PDF pages with iText 7 using copyPagesTo. It works for most files, but a few PDFs from third parties make the copy blow up with java.lang.UnsupportedOperationException, and that kills the ...
Score of 0
1 answer
568 views
What is the most secure way to embed a PDF (preview) into a website? [closed]
Aim
Just embed a PDF (preview) into a website. This is very likely a well-known use case.
Given I have this use case for showing a PDF preview, I am searching for a solution. And yes I know e.g. MDN ...
Score of 2
0 answers
202 views
Calling remove_from_tree on outline item causes "Removed child does not appear to be a tree item" error
I want to change bookmark (aka outline item) colors in a PDF document from black to blue.
It's my understanding that pypdf can only add outline items; you can't change the properties of those already ...
Score of 2
1 answer
111 views
Pandoc not displaying front matter (YAML) date when compiled
I'm using Pandoc to convert my Markdown (4,000 word count) file to PDF. My problem is the date won't appear on the PDF. Here's my system info:
pandoc 3.7.0.2
Features: -server +lua
Scripting engine: ...
Score of 1
1 answer
229 views
How to programmatically build /StructTreeRoot tags using pypdf/pypdf2 without breaking existing PDF visual content?
I am developing a Python FastAPI backend to inject PDF accessibility compliance tags (WCAG 2.1) into existing documents generated from Adobe InDesign. The layout and visual binary bytes must remain ...
Score of 0
1 answer
239 views
How can I make Firefox's PDF viewer automatically re-load the PDF if it changes?
I use Firefox as my PDF viewer while I write them in another program. How can I make the PDF automatically refresh in Firefox when the file changes?
I am open to workarounds like refreshing every 5 ...