To rotate pages, either select pages in the page thumbnail view and right-click on one of the selected pages and select 'Rotate Pages.', or select Tools>Pages>Rotate.
#How to rotate and save pdf document code
The code sample below scales source content of two document pages and draws these pages in a landscape page. This will 'stick', so the next time you open the document, you will get the page rotation that you set in your last session. Merge Content of Multiple PagesĬall the PdfGraphics.DrawPageContent(PdfPage) method to draw page content. Refer to the following article for more information about PDF graphics: PDF Graphics. The PdfDocumentProcessor.RenderNewPage method allows you to render a new page with graphics.Ĭall the PdfGraphics.AddToPageForeground or PdfGraphics.AddToPageBackground method to add graphics content (for example, an image or string) to an existing page’s foreground/background.Īdd a reference to the 22.1 assembly to access the PdfGraphics class. Target.CreateEmptyDocument(".\.\ExtractedFirstPage.pdf") Using target As New PdfDocumentProcessor() Using source As New PdfDocumentProcessor() Target.CreateEmptyDocument(".\\.\\ExtractedFirstPage.pdf") Using (PdfDocumentProcessor target = new PdfDocumentProcessor()) Source.LoadDocument(".\\.\\Document.pdf") Using (PdfDocumentProcessor source = new PdfDocumentProcessor()) The following code adds a new page to a document: Select the PDF you want to add, and click Open. Check the permissions of a PDF by choosing Tools > Show Inspector, then click the lock icon). Inserts a page at a specified position (page number). Some encrypted PDF documents can’t be merged, according to Apple. Use the following API to append or insert a new page: Method Select the 'Rotate Printout' option from the menu, and then select 'Rotate Right 90°' or 'Rotate Left 90°'. Click on the PDF page to select it and right-click it. You can obtain specific page properties by the page index. Make sure that you installed this add-in on your device. Returns a list of PdfPageFacade objects that contain PDF page properties. This object exposes members used to perform various operations on a PDF file without access to its inner structure. You can get a specific page by its index. Loads a document into the PDF Document API component. The table below lists API used to load documents to the PdfDocumentProcessor, access the document and its pages, and save the result.
The PDF Document API allows you to add, remove, and customize pages.