- Home
- Purchase
- Developer Tools
- BarCode Generator SDK
- BarCode Generator SDK for Javascript for Code 128
- BarCode Reader SDK
- PDF Generator SDK for Javascript
- PDF Extractor SDK
- PDF Renderer SDK
- PDF To HTML SDK
- PDF Viewer SDK
- Spreadsheet SDK
- Image To Video SDK
- Screen Video Capturing SDK
- SWF To Video and Images SDK
- Images Watermarking SDK
- Document SDK beta
- Misc Tools
- Desktop Utilities
- Download
- Support
- Company
The PDFDoc Scout SDK product has been acquired by Lionsoft company in January, 2011 and not available on our web-site anymore.
NEW: pdf generator for Web Developers: PDF Generator SDK for Javascript: click here to read more details...
For 3rd party C# open-source PDF generation library? Check the blog article: .NET Bear, Do You Know Any Free PDF Generation Libraries For Use In Commercial Applications?
Check our commercial products for PDF format:
PDF Extractor SDK - extract tables, text, structured data from PDF files in your apps
PDF Renderer SDK - render PDF files to PNG, BMP, TIFF images in your apps
PDF To HTML SDK - convert PDF to HTML with images and formatting preserved
Creating Outlines (Bookmarks) tree for PDF document in PDFDoc Scout library
Download the source code of this example (VBScript) here: pdfdocscout_outlines.zip
Download the source code of this example (VB.NET) here: pdfdocscout_outlines_vb_net.zip
This example demonstrates how to generate bookmarks tree in PDF document using PDFDoc Scout library
Generated PDF document (screenshot):

or view generated PDF document online: pdfdocscout_Outlines.pdf
Source code:
Set PDFDoc = CreateObject("PDFDocScout.PDFDocument") ' create PDFDoc object
PDFDoc.InitLibrary "demo", "demo" ' initialize library
PDFDoc.OutputFileName = "Outlines.pdf" ' set output filename for PDF document
PDFDoc.AutoOpenGeneratedPDF = true ' automatically open generated PDF document in default PDF viewer application
PDFDoc.ViewerOptions_PageMode = 1 ' 1=pmUseOutlines so PDF document will be opened with visible outlines tree by default
PDFDoc.BeginDocument ' starts PDF document generation
' add root outline node
Set actGotoPage = PDFDoc.AddGoToPageAction(0, 0) ' page #0 and top offset = 0 for the very first outline
Set outlineRoot = PDFDoc.Outlines.AddChild (nothing, "PDFDoc Scout Demo", actGotoPage, 0)
outlineRoot.Expanded = true ' root outline is expanded by default
PDFDoc.Page.AddText "This is a main page for this demo", 100, 10, 0
For i = 1 to 10
PDFDoc.AddPage
' add text to a page
PDFDoc.Page.AddText "This is a page #" & CStr(i), 100, 10, 0
' create outline for this page
Set actGotoPage = PDFDoc.AddGoToPageAction(i, 0) ' i = page number, 0 is Y top offset
Set outlinePage = PDFDoc.Outlines.AddChild (outlineRoot, "Page " +Cstr(i), actGotoPage, 0)
' now we add 5 sub-topics on the same page and then create sub-outlines for each sub-topic
for j=1 to 5
' add text for sub-topic
PDFDoc.Page.AddText "Sub-topic #" & Cstr(J+1) & " on page #" & CStr(i), 100, 100 + j*50, 0
' add sub-outline for sub-topic
Set actGotoSubTopicOnPage = PDFDoc.AddGoToPageAction(i, 100 + j*50) ' i = page number, 100 + j*50 is Y top offset for sub-topic
Set outlineSubTopic = PDFDoc.Outlines.AddChild (outlinePage, "Sub-topic #" +Cstr(j), actGotoSubTopicOnPage, 0)
Next
Next
PDFDoc.EndDocument ' close pdf document generation
' disconnect from library
Set PDFDoc = Nothing
Download the source code of this example (VBScript) here: pdfdocscout_outlines.zip
Download the source code of this example (VB.NET) here: pdfdocscout_outlines_vb_net.zip
Filed in:
PDFDoc Scout SDK
Tutorials:


