PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 8:50 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue May 02, 2023 7:29 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
I generate PDF file and when it opens in Adobe Acrobat Pro printing errors out with message "The document could not be printed."
And if I try to "Save As" is says "The document could not be saved. There was a problem reading this document (14)."

Any idea what it could be or how could I detect where is the problem in file?
The issue is, that people access file from browser, and if PDF is associated with Adobe Acrobat Pro, there is nothing they could do with the file, except viewing it.

I found here in forum issue relating to PostScript, and tried to change from from "Arial Unicode MS" to "Times-Roman" but the problem persists.

If needed, I can send sample file with the issue.
Thx in advance


Top
 Profile  
Reply with quote  
PostPosted: Wed May 03, 2023 8:08 am 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
From the Acrobat Pro preflight check I got this info:
Quote:
The array element at index 0 is of incorrect type
Value: null
Type: CosNull
Formal Representation: PageAnnots
Cos ID: 13
Traversal Path: ->Pages->Kids->[0]->Annots
The array element at index 1 is of incorrect type
Value: null
Type: CosNull
Formal Representation: PageAnnots
Cos ID: 13
Traversal Path: ->Pages->Kids->[0]->Annots


And found this line in problematic PDF:

Quote:
/Annots 13 0 R


If I remove it, preflight claims file is corrupt, but document can be printed and Saved As (from Arobat Pro)
After Saved As I get document that is ok.

Any idea which command is producing Annots tag and what can I do to fix it when making PDF?
PDF is made by adding data to existing template (which prints fine)


Top
 Profile  
Reply with quote  
PostPosted: Wed May 03, 2023 9:21 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
gastan wrote:
PDF is made by adding data to existing template (which prints fine)
We don't have that template and we don't see the code that makes the modification.
We do not even know which library you are using to add data.

See also:
https://docs.pdfsharp.net/General/IssueReporting.html

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Wed May 03, 2023 4:10 pm 
Offline
Supporter

Joined: Sat Oct 18, 2008 4:15 pm
Posts: 50
Thx for your reply.
I use PDFsharp 1.51.5185-gdi
Does it make sense to send working template or nonworking file while I prepare minimal project to reproduce?
Also any idea how to see on which page is that annoying Annots element?


Top
 Profile  
Reply with quote  
PostPosted: Thu May 04, 2023 8:55 am 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
gastan wrote:
Does it make sense to send working template or nonworking file while I prepare minimal project to reproduce?
The working template and code to produce the non-working file would be good.
But also good to include a non-working file.

gastan wrote:
Also any idea how to see on which page is that annoying Annots element?
I ain't seen nothing yet.
But maybe create single-page templates from the template and try which pages work and which pages fail.
Not sure if "Cos ID: 13" or "Pages->Kids->[0]" can give any hints.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 128 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group