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 708 times
|
|
|