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);
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)
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)
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