PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Remove outline / bookmarks problems
https://forum.pdfsharp.net/viewtopic.php?f=2&t=997
Page 1 of 1

Author:  morten [ Fri Dec 18, 2009 1:15 pm ]
Post subject:  Remove outline / bookmarks problems

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...

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/