This example generates a PDF document that has solid, red, 0.5-point borders positioned 20 points from the page margins.
Import the DOM API package so that you do not have to use long, fully qualified class names.
Create a PDF document.
d = Document("myDocument","pdf"); open(d);
PageBorder object and specify the style, color, width, and margin for all border segments. For PDF Documents, the margin of a border segment specifies the distance between the segment and the page margin.
pageBorder = PageBorder("solid","red","0.5pt","20pt");
PageBorder property of the layout associated with the document to the
d.CurrentPageLayout.PageBorder = pageBorder;
Add text to the document. Close and view the document.
append(d,"The solid, red, 0.5-point border segments are twenty points from the margins."); close(d); rptview(d);