First post, thanks to all developers and contributors for a brilliant library!
I'm attempting to scan the outline of a Word 2007 created pdf document, store the page number that each bookmark reside on, and then remove the entire outline from the document.
Unfortuneatly pdfsharp doesn't recognize the outline (PdfDocument.Outlines.Count = 0), so I'm trying to remove it using PdfDocument.Internals.RemoveObject(PdfObject).
When I save the document, the dictionary is still there, and the outline is visible in Acrobat Reader. In other words it's not working.
BUT, if I have the pdf document im trying to modify and save open in Acrobat at the time I call PdfDocument.Save(filename), it generates an exception (like it should), if I now close Acrobat Reader, and continue on the exception, it saves and the outline dictionary is gone. The bookmark meny is also gone from Acrobat Reader.
Any clues? I suspect I'm not using RemoveObject() correctly...
|