问题
I am new here and new to iTextsharp. I have successfully created a pdf portfolio file and displayed it on browser. The default layout is details or custom. And my boss hopes to add some layout for it, like click-through or revolve. Does anyone know how to do it? I will appreciate your help!
Should I embed the .nav file into pdf portfolio or create a navigation by myself? I don't know how?
回答1:
.nav files are described in the Adobe extensions to ISO-32000-1 (level 3) as described on page 541 of iText in Action, Second Edition. .nav files aren't explicitly mentioned in this excerpt, but the extension specification does mention them.
iText doesn't support .nav files out of the box. I think it should be manageable to extract the necessary information out of a .nav file and add them in yourself using iText. Of course, you'd need to respect the ISO specification and know how the level 3 extension works.
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/adobe_supplement_iso32000.pdf Relevant pages:
p34 - Navigators
p130 - .nav files
回答2:
I found a way to assign a custom layout/navigator to a PDF portfolio collection using a template file when the PDF is created via iTextSharp. I have detailed my answer here:
Assigning an Existing Custom Layout/Navigator to a Portfolio Generated By iTextSharp
来源:https://stackoverflow.com/questions/15976668/how-to-embed-a-nav-file-into-pdf-portfolio