PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Oct 16, 2021 11:32 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: Tue Sep 30, 2014 12:36 pm 

Joined: Tue Sep 30, 2014 12:29 pm
Posts: 26
Hello !

First, I'd like to thank the PdfSharp Team for putting their useful library in the public.
We use it at work to fill out forms and are quite happy with it.

We currently have to use the well-known approach of mixing PdfSharp with itext
when it comes to Documents created with a more recent version of Acrobat.
(The also well-known XREF-Stream issue)
Although this approach "works", i find it not very pleasant.

So i decided to have a look into this issue in my spare-time.

Long story short, i added support for some missing main features.
Although i have the feeling it's not quite ready yet, i decided to put this stuff out
before it starts to decompose on my hard-drive.
(I may not have the time to put further work on this in the near future)

Added main features :
- Support for XREF- and Object-Streams
- Support for Encryption up to AES256, e.g. Acrobat X (currently only for opening Documents)

Other enhancements :
- Fixed ASCIIHexDecode Filter
- Support for Dictionaries in Content-Streams (HACK: Entries are stored in a CArray)

There are some caveats, though:
- Solution- and Project-Files are for Visual Studio 2013 Express
(they should work for VS2012 and VS2010 as well, but i had no chance to test it)
- The .NET Target-Framework had to be changed to 3.5 in order to support AES Encryption.
(if you don't need AES Support, you can switch back to 2.0 after commenting out all references)
- I couldn't get my hands on a Document that was encrypted with a Revision Value of 5,
so this is not tested.
Maybe someone on this forum can supply such a Document or verify that it actually works ?

Usage :

1. Obtain the PdfSharp Source Code and extract it somewhere
(Source can be found at http://sourceforge.net/projects/pdfsharp/files/)
You should keep a backup of the source in case something goes wrong !
2. Download the attached ZIP-File and extract it somewhere else.
3. Open the file "!!CHANGE PATH!! update.bat" from the attached ZIP in a Text-Editor
and change the path to the one you used to extract the PdfSharp-source.
(It should be the path, where you find the file "BuildAll-PdfSharp-VS2010.sln")
4. Run the modified Batch-File (!!CHANGE PATH!! update.bat)
This will overwrite some of the original source-files of PdfSharp and add new files.
Note: Some of the files may only be reformatted by VisualStudio to match my TAB-Settings
and do not contain actual changes. I was too lazy to sort them out...
5. Open the Solution (BuildAll-PdfSharp-VS2010.sln) in Visual Studio and build it.
6. Have fun !

Best Regards,

PdfSharp_changes_30092014.zip [112.9 KiB]
Downloaded 515 times
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: Bing [Bot], Google [Bot] and 12 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