|
|
Code:
using(var doc = PdfDocument.CreateNew())
{
var page = doc.Pages.InsertPageAt(0, 500, 500);
//Create a file specification for the target document.
var fileSpec = new PdfFileSpecification(doc);
fileSpec.FileName = @"e:\0\1GB\test_big.pdf";
//create destination in remote document
var dest = new PdfDestination(doc);
dest.IsSameDocument = false;
dest.PageIndex = 99;
//create a new bookmark (the bookmark will target the current document)
var bookmark = doc.Bookmarks.InsertAt(0, "Title", page);
//Create action dictionary
var action = PdfTypeDictionary.Create();
//Action type
action["S"] = PdfTypeName.Create("GoToR");
//file specification
action["F"] = fileSpec.Dictionary;
//destination in remote document
action["D"] = PdfTypeArray.Create(dest.Handle);
//set an action to a bookmark.
bookmark.Dictionary["A"] = action;
//remove the old destination from the bookmark.
bookmark.Dictionary.Remove("Dest");
doc.Save(@"e:\80\test.pdf", SaveFlags.NoIncremental);
}
|
|
|
Hi there I need to create a bookmark which point to a external url From what I learned so far, seems I need to create a pdfAction(with externl uri) for this But then I found that with PdfBookmark I can not change the pdfaction propety directlly
So is there a way which I can create a bookmark(link to external pdf file) from pdfium net?
Thanks in advance
|
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close