PDF Bookmarking can be accomplished by either inserting PB- sheets where you desire a PDF bookmark to be set (see screenshot) or via scripting (see code below):
)>
Or…
This code will create a PDF Bookmark on the first page of a document based on the value entered in the field PDFBookmarkName:
public virtual bool DocumentDataRecordValidated(IDocument document, IDataRecord dataRecord, bool valid, ref string validationMessage)
{
try
{
document.Pages[0].PDFBookmarks.Clear();
document.Pages[0].PDFBookmarks.Add(dataRecord["PDFBookmarkName"].StringValue, 1, Color.Black, FontStyle.Regular);
return valid;
}
catch (Exception exception)
{
base.ProcessException(exception);
return false;
}
}
Comments
Please sign in to leave a comment.