Create pages
You can create new pages and add them to existing documents or create a new document.
Create new document page in Xamarin.Android
You can add new pages in a document using the UI component or programmatically with the Xamarin.Android API.
UI Component The add pages dialog allows you to add pages with a graphical interface in the document viewer.
API guide You can programmatically add new pages to documents or even create new documents.
Create a new blank page in Xamarin.iOS
To create a new 8.5x11 blank page and add it at the end of document's page sequence.
Note that, after the page is created, it does not yet belong to a document's page sequence. The page needs to be placed within the page sequence in order to become "visible". PagePushBack() inserts page x into the position of the document's last page.
PDFDoc doc = new PDFDoc();
// create a new page
Page x = doc.PageCreate();
doc.PagePushBack(x);About creating a new blank page
To create a new page, use the PDFDoc.PageCreate(media_box) method. PageCreate() takes an optional Rect argument that can be used to specify page size. This Rect is called a media box.
A media box is a rectangle, expressed in default user space units, defining the boundaries of the physical medium on which the page is intended to be displayed or printed. A user space unit is 1/72 of an inch. If media_box is unspecified, the default dimensions of the page are 8.5 x 11 inches (or 8.5*72, 11*72 units).
Last updated
Was this helpful?