At 16:58 21/08/2009 +0500, Jahangir wrote:
>The problem I am facing is that, I am converting a postscript to pdf, and
>I want to retain the bookmarks/table-of-contents in the pdf. For this I
>have added the -dDOPDFMARKS switch to ghostscript. But the issue is that
>it doesn't retain the bookmarks/TOC at all. I have searched the web but
>couldn't find a solution to my problem, but all this surfing got me
>thinking, what if there is no bookmark information in the post script to
>be retained. So, my question here is that, do postscripts hold bookmarks
>info by default, or do we have to, somehow, put it in there ourselves?
PostScript does not include any of this information. It is possible to add
this to a PostScript file using the 'pdfmark' operator. PostScript files
including pdfmark should test the interpreter to see whether it defines the
pdfmark operator and either not use it, or provide a default, if it does not.
Adobe publishes the pdfmark specification as part of the Adobe Acrobat SDK,
the current revision is from June 2008 and should be available somewhere on
the Adobe partners web site.
This does not, however, affect PDF files. PDF files contain the information
directly, and so do not contain any pdfmark operations (so adding
-dDOPDFMARKS will have no effect if the input is a PDF file).
I don't think that our PDF interpreter currently extracts this information,
and so does not pass it to the PDF writer. As a result this information
would be lost.
If I'm incorrect on this I'm sure Alex will tell me ;-)
It would be possible to add at least some of the information from a PDF
file to an output PDF file, but there are potential problems. For example
it is possible (using GS) to process only part of a PDF file, if we
processed the bookmarks then they may not apply properly to the output PDF
file.
Ken
_______________________________________________
gs-devel mailing list
gs-devel@...
http://www.ghostscript.com/mailman/listinfo/gs-devel