Bookmark Tree with SetBookmark

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
Panigas
Posts: 1
Joined: Wed Oct 23 2002

Bookmark Tree with SetBookmark

Post by Panigas » Wed Oct 23 2002

Hi all,
I just came up to a what seems to be a conceptual problem, so I would like a hint on this:

I have a VC++ (but this is appliable to other languages as VB too) application which does a huge number (say n) prints of a report.
When I print, I set the option APPENDTOEXISTING

Code: Select all

(*SetFileNameOptions)(pdfPrinter, NOPROMPT | USEFILENAME | APPENDTOEXISTING);
in order to have a unique resulting file on n appended prints.
I am trying to use the SetBookmark function in order to have a tree
but I am encountering some problems

I am in a condition in which I cannot use the

Code: Select all

long SetBookmark(long hDC, long level, LPCTSTR title) 
the problem with this version is that I do have n separate prints but this function works fine only inside a single print job;
If, for instance, I try to put a bookmark at level 1 from a subsequent print (which will be later concatenated) the function won't work as won't know where to put the bookmark because in the current print there's no
bookmark at level 0 (root).

So, to get around this, I keep a list of the pages, the bookmark titles and the level at which I would like

the bookmarks in the tree, and I use the other version of the

Code: Select all

BOOL SetBookmark(long page, LPCTSTR Title, long Level)
I open the generated document (the resulting document now has all
the n prints inside)
I enumerate the list and call the above version function,
but the problem here arise again, since I can only specify 0, 1, -1
to say I want the item at the same level, at child level or at parent level with respect to the previous added bookmark.

BUT what if I need (and I do need to) to jump from one level to another which is not necessarily the previous one?
Say I am down at level 3 in the tree, I want to put another root item or another item at level 1, I can't do this with this function, can I?

So, is there any way to obtain a bookmark tree resulting from a file concatenation and using

Code: Select all

BOOL SetBookmark(long page,LPCTSTR Title, long level)
?


Thanks in advance

E. Panigas

Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan » Wed Nov 06 2002

The new version of the PDF Converter will enable you to add bookmarks at levels other than the previous and precedent ones.

You can use the SetBookmark function and specify the bookmark Level to -3 instead of -1.

Have a nice day !

Post Reply