- 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 PDF SDK for .NET product has been acquired by Sybrex company in January, 2011 and not available on our web-site anymore.
NEW: Check our new rich PDF reports generator for Javascript (completely client side generation): PDF Generator SDK for Javascript: click here to read more details...
For 3rd party server side 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?
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
Add bookmark (outline) opening external PDF document on mouse click using Bytescout.PDF library for .NET
Adding outline to open external PDF document on click
This example provides a Visual Basic for NET demonstrating how to add outline into bookmarks tree and how to set this outline to open external PDF on 2nd page on user when user clicks the outline
Download example source code: bytescoutpdf_outline_opening_external_pdf.zip (14 KB)
Imports Bytescout.PDF
Module Module1
Sub Main()
' Create main PDF Doc Engine
Dim engine As New PDFDocEngine("", "")
' Add new document
Dim document As Document = engine.AddDocument()
' Append new page to the document
Dim page As Page = document.AddPage(PageSizeType.A3, PageOrientationType.LandScape)
Dim page2 As Page = document.AddPage(PageSizeType.A3, PageOrientationType.LandScape)
' Create new drawing
Dim drawing As Drawing = page.AddDrawing()
' Add standard font
Dim font As UInteger = document.AddFontStandard(StandardFontType.Courier, FontEncodingType.WinAnsi)
' Set Active Font
drawing.SetActiveFont(font, 50, False, False)
' Draw Text
drawing.PlaceText(100, 100, 0, "Click Bookmarks (outlines)")
' Create new drawing
drawing = page2.AddDrawing
' Set Active Font
drawing.SetActiveFont(font, 50, False, False)
' Draw Text
drawing.PlaceText(100, 100, 0, "to test bookmark to external PDF")
' Closing drawing on the page
drawing.Close()
' Add root outline
Dim outline As Outline = document.Outlines.AddChild()
outline.Title = "Root"
' Add link to page 1
Dim child As Outline = outline.AddChild()
child.Title = "Page 1"
child.destination = New Destination(document, "Page1", False)
' Add NamedDestination to document
document.AddNamedDestination("Page1", Destination.FitPage(0))
' now making an action for external PDF and assigning to a new outline
' create a struct holding information about position of the linked text in external PDF
Dim destInfo = New DestinationInfo()
destInfo.PageIndex = 2 ' set index of the page to show in external PDF document
destInfo.Type = DestinationType.FitPage ' set default view mode for external PDF
' create Destination object to use in action to implement a link
Dim linkDest = New Destination(document, destInfo, True, True)
' create new action opening external remote document
Dim actionLink = New ActionGoToRemote(document, "PDFs/ExternalPDF.pdf", linkDest, True)
' Add link to page 2
child = outline.AddChild()
child.Title = "External PDF"
child.action = actionLink
' Save document
document.Save("OutlineOpeningExternalPDF.pdf")
End Sub
End Module
Download example source code: bytescoutpdf_outline_opening_external_pdf.zip (14 KB)
Filed in:
PDF SDK for .NET
Tutorials:


