SetBookmark returns OK but PDF contains no bookrmarks.

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
mkb137
Posts: 4
Joined: Wed Jun 25 2008

SetBookmark returns OK but PDF contains no bookrmarks.

Post by mkb137 »

SetBookmark calls appear to work and return incrementing integers (1,2,3,4), but the printed PDF contains no bookmarks. Is there something I'm missing?

The code goes something like this:

Code: Select all

   hPDF = DriverInit(PDF_PRINTERNAME)
   hDC = CreateDC(hPDF)
   lRet = SetDocFileProps( hPDF, LockName, OPTIONS, "", PDFPath)
   lRet = EnablePrinter(hPDF, Company, Code)
   bookmark = SetBookmark(hDC, 0, "Bookmark")
   bookmark = SetBookmark(hDC, bookmark, "Child Bookmark")
   // {do printing}
   bookmark = SetBookmark(hDC, 0, "Bookmark 2")
   bookmark = SetBookmark(hDC, bookmark, "Child Bookmark 2")
I put SetBookmark before and after printing just as a test.



Thanks.
Jose
Amyuni Team
Posts: 553
Joined: Tue Oct 01 2002
Contact:

Re: SetBookmark returns OK but PDF contains no bookrmarks.

Post by Jose »

Hello,

The issue you are encountering is normal, the printer call only access its own DC and not another application's DC.

If you wish to add bookmarks to your documents, I suggest that you look at the Document.SetBookmark()Method.

Hope this helps?
Get PDF Suite, the expert .NET developer toolkit for PDF conversion, creation and editing - www.amyuni.com/pdfsuite
Post Reply