PDFsharp & MigraDoc Foundation

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

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Feb 03, 2010 2:02 pm 
Offline

Joined: Tue Feb 02, 2010 10:39 am
Posts: 2
PdfSharp 1.31

When invoking PdfDocument.Save second (and next) time on the same instance there may be errors.
1) If there are embedded Unicode fonts in the document then an InvalidOperationException raises from the PdfToUnicodeMap.PrepareForSave method.
2) If the PdfDocument.Options.CompressContentStreams is set to true then corrupted PDF is generated.

I've attached a patch for both situations. Note that line numbers may slightly differ.

Is multiple times saving of a document is supported by design? The case is generation of huge report in interactive application. The contents of report is got from server in parts. When the next part is received and rendered to PdfDocument I want to present the current contents of the document to the user. For some reasons I cannot use rendering to GDI+ Graphics offered by PdfSharp and use Acrobat ActiveX for presenting PDF files. That's why I need to save the document before it is complete.


Attachments:
File comment: A combined patch for PdfToUnicode.cs and PdfContent.cs.
patch.zip [564 Bytes]
Downloaded 495 times
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 36 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:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group