cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

PDF Bookmark Question

daniel.bono.ctr
1-Newbie

PDF Bookmark Question

Hey Adepters,

I hope somebody out there can help me with PDF
Bookmark generation.

Actually, generating bookmarks isn't the problem.
The problem is ensuring that all the bookmarks
actually work as links.

I'm trying to get PDF bookmarks based on "hidden"
content. By that I mean that I have styled the
elements in question as "title" so they'll get
picked up, but I have set the Font Property -
Hidden to "yes" because the bookmark text is not
actually present in the XML and should not appear
in the pages.

Let me provide an example.

Here are the PDF bookmarks for Appendix B:

- Reference Drawing Groups
- Group A
- Data
AAZE
ACVR
ACVS
-Drawings
- Group B
- Data
ACVT
AASL
AASB
- Drawings
- Group C
- Drawings
- Group D
- Drawings

The phrase "Reference Drawing Groups" doesn't
appear anywhere in the XML. The phrase "Group A"
is part of the page set header and, therefore,
is not style-able as "title".

"Data" and "Drawings", likewise are not part of
the content. They represent subsections of the
appendix. The lowest-level bookmarks are taken
right from the content and *could* work as
bookmarks. I say "could" because I'm using a
gentext table with insert-element-content to get
fine control over the alignment of this (inline)
data (but I digress - that's a problem for another
time).

In order to force bookmarks for these strings, I
made up a new element, put the string
constants into them, and styled them as "title".
Since these strings aren't supposed to appear in
the pages, I set them as "hidden". That seemed to
work well. I saw all the bookmarks, properly nested.
Unfortunately, nothing happens when you click on a
bookmark that's derived from "hidden" content.

I've tried this both in FOSI and XSL. I've tried
this using the usual DCF approach and also using
the XSL Table-of-Contents approach (which, by the
way, gave me good control over context-specific
inclusion).

So. What do you think? Am I trying to cut down the
mightiest tree in the forest with a herring, or am
I just using the wrong fish-wielding technique?

Any suggestions would be appreciated.

Thanks.
Dan Bono
4 REPLIES 4

This is just a top-of-the-head, random-synaptic-firing type of comment.
Assuming that making the elements "hidden" is the key:
If the page background is always white and you don't mind a little extra
white space, maybe instead of "hidden" you could make the text white.
Hey, I used the word "white" three times in one sentence!

Hi Dan--

We use a somewhat unorthodox approach to doing bookmarks in PDF (using XSL-FO formatting). It may be a bit more work than you're willing to do, especially if you're not familiar with postscript programming, but I'll throw it out just as an option.

We started using XSL-FO before Arbortext started providing support for bookmarks, so we cooked up our own independent scheme, which works quite nicely. Here's what we do:

1) From the XML, generate an encapsulated postscript file containing the postscript PDFMark commands to generate the desired bookmarks.

2) When generating the XSL-FO instance, insert a "graphic" (<fo:external-graphic>) that references the EPS file generated in step 1. Because it's just PDFMark commands, it won't actually show up on the page, but it will provide the desired bookmarks.

Because we're controlling the creation of the bookmark code with an XSLT transformation, we can decide what text to use where, which headings to include or exclude, etc. etc., more or less independently of what appears on the pages in question.

If you're interested in pursuing this approach, let me know and I can provide more details. Oh, one more caveat--this approach assumes you're using Distiller (or the virtual printer version thereof) to produce your PDF files. I have no idea whether this would work with direct-to-PDF production.

--Clay

Thanks to both Clay and Ed for their suggestions. I started out using Ed's suggestion of white-on-white. That worked pretty well in terms of allowing me to extract bookmarks while preserving the page layout.

Unfortunately, any search against the resulting PDF that contains bookmark text returns matches for the hidden text.

I considered Clay's suggestion of modifying the postscript and then passing it to Distiller. I may yet come back to that but I haven't yet given up hope of an out-of-the-box solution.

My users have approved an approach that has us changing some of the bookmark text to match that of the content and in other instances we will be introducing new "title" text so that E3 has something to grab onto for bookmark generation.

Given that concession from the users, I have
turned my attention back to getting the bookmark text to appear properly formatted on the page. What I need to do is get three elements to typeset all on a single line. The first of the elements contains my bookmark content, so it's styled as "title". The other two elements are styled as "inline". I have tried various approaches including creating a one-row, three-col table to force alignment,
but so far none of it has produced the desired effect.

Does anybody have suggestions on how to inline multiple elements when the first one must be styled as "title"?

Thanks.
Dan

Hi Adepters,

I am clueless on how to create Bookmarks in FOSI. Even though I have looked thought the help topics it still doesn't register.

I want to have a mark when each chapter in a manual. Could you please provide some more details on how to accomplish this task?

Thanks in advance for your help!

S. Egrub
Announcements