You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using PdfDocumentBuilder.AddPage to merge multiple PDF files. When the source PDF contains annotations that highlight regions then the created (merged) PDF has some problems with those annotations. The problems differ based on the PDF reader application:
With Acrobat Reader: The annotations change their color and can't be removed any more.
With Firefox: The annotations don't show a tooltip any more.
But this problem only happens if at least a page is inserted before the copied page. So maybe there is a problem with page numbers/references in the created file?
If you don't have any time to look at this right now, could you then please point me to the right place where I could start looking to fix this myself?
stringinputFile=@"C:\Data\Input.pdf";stringoutputFile=@"C:\Data\Output.pdf";usingvartargetStream=File.Open(outputFile,FileMode.Create,FileAccess.Write);usingvaroutputDocument=newPdfDocumentBuilder(targetStream);usingvarinputDocument=PdfDocument.Open(inputFile);// This line is important to reproduce the problem!outputDocument.AddPage(PageSize.A4);for(inti=1;i<=inputDocument.NumberOfPages;i++){outputDocument.AddPage(inputDocument,i);}
I've tested the following versions of PdfPig, all are affected:
0.1.8
0.1.9
0.1.10-alpha-20250224-f26e7
Expected output:
The annotations should show tooltips in Firefox.
It should be possible to delete the annotations in Acrobat Reader (via the delete icon that appears after clicking on the annotation )
The annotation colors should look like this:
Actual output:
The annotations don't show a tooltip in Firefox.
The annotations can't be deleted in Acrobat Reader.
The annotation colors change shortly after scrolling and look like this in Acrobat Reader:
The text was updated successfully, but these errors were encountered:
I'm using
PdfDocumentBuilder.AddPage
to merge multiple PDF files. When the source PDF contains annotations that highlight regions then the created (merged) PDF has some problems with those annotations. The problems differ based on the PDF reader application:With Acrobat Reader: The annotations change their color and can't be removed any more.
With Firefox: The annotations don't show a tooltip any more.
But this problem only happens if at least a page is inserted before the copied page. So maybe there is a problem with page numbers/references in the created file?
If you don't have any time to look at this right now, could you then please point me to the right place where I could start looking to fix this myself?
Sample input file: Input.pdf
Sample code:
I've tested the following versions of PdfPig, all are affected:
Expected output:
)

The annotations should show tooltips in Firefox.
It should be possible to delete the annotations in Acrobat Reader (via the delete icon that appears after clicking on the annotation
The annotation colors should look like this:
Actual output:

The annotations don't show a tooltip in Firefox.
The annotations can't be deleted in Acrobat Reader.
The annotation colors change shortly after scrolling and look like this in Acrobat Reader:
The text was updated successfully, but these errors were encountered: