• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can I use markers to drive the bookmarks in PDF ?

Advocate ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

I am creating an application for a large customer who needs better control over the bookmarks in their PDF output. So far, I have been able to generate PDF bookmarks from special paragraph tags. The problem is that the bookmarks do not always reflect the exact text of the titles that they point to. Also, the titles are not always given the same paragraph tag, depending on a lot of formatting rules that need to be applied.

As all of this is round tripping to XML, I have created XSLT to create fm_bookmark elements which contain the desired bookmark text and pick up a paragraph tag that makes them show up in the contents tab of the PDF at the right level. The paragraph tags "bookmark_level_1" etc. are made invisible by setting them to white font color and tiny (2pt is the minimum) font. The remaining problem is that it is a paragraph, even though it is invisible for the human reader. This means that spacing above and below the paragraph kicks in and offset the actual title from the top of the page. I could theoretically adjust the space above and space below to 0pt but when vertical justification kicks in, there will be empty space above the title anyway.

I have checked for markers that can take up the role of bookmark generators but there is no indication in the Bookmarks properties that any particular marker type will be picked up. Also, how to set the level of the bookmark is unclear to me. Maybe I am asking for too much but I don't believe I am the only one struggling with this problem.

Any hints about how to make this work without introducing tons of work ?

Thanks in advance

4everJang

TOPICS
Structured

Views

1.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

Jang,

I would recommend using the Invisible characteristic of Color Views instead of using White to make the text actually invisible, i.e. FM won't actually output anything for it.

To get around extraneous white space for special case content like you require for the bookmarks, I have always used an anchored frame hanging outside of the text frame (or column depending upon your layout). The AFrame contains a text frame using Invisible text color for the special content. Since the AFrame is part of the flow, any reference to it always falls in the correct location (of the anchor).

Hopefully, this isn't too difficult to do in a structured application.

Arnis

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

Hello Arnis,

Thanks for the tip on Invisible color.

About the anchored frame with text frame and invisible bookmark text in it: that was exactly what I was thinking but I doubt that it would simply work with XML - it might require a script that restores the frames when the doc is loaded. For the moment I am not prepared to do all the extra work and we will go with the solution as we have it. I am going to ask the dev team to make a changes to the feather mechanism (first of all call it vertical justification, as noboty understands what feather means outside of Photoshop).

Jang

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

Hi Jang,

The problem is that the (PDF) bookmarks do not always reflect the exact text of the titles that they point to. Also, the titles are not always given the same paragraph tag, depending on a lot of formatting rules that need to be applied.

So, that's like a titlealts/navtitle in DITA for XHTML5 output right? I understand that you are somehow doing this already with your fm_bookmarks_element.

Maybe an alternative: If you can work for a while with old Distiller router, you might want to think about generating pdfmarks in a PostScript frame to create bookmarks as an event script that kicks in before printing. This would at least not affect the layout.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

LATEST

Hi Stefan,

Thanks, but the old Distiller is definitely not a good idea here. We are quite happy with the much fastter new PDF generation, as we're talking multiple issies of 200-500 page EU journals in 23 languages per day produced by FPS. I will stick with my current solution (enhanced by Arnis' suggestion) and ask the dev team to allow a simple method for suppressing the vertical adjustment (feather) mechanism for specifc paragraphs. I will propose to skip any vertical adjustment stuff on paragraphs if they are marked as "keep with next" of "keep with previous". With that and the invisible text plus fixed linespace of 0pt on my bookmark paragraph, I have exactly what I want.

Kind regards from Belgium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines