PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
ComPDF supports single-page, double-page, and book mode arrangements for documents, facilitating reading through both page flipping and scrolling methods. Additionally, it offers options to set cropping mode.
This example shows how to set the display mode to single continuous:
var pdfview = CPDFView()
pdfview.displayTwoUp = false
pdfview.displaysAsBook = false
pdfview.layoutDocumentView()CPDFView pdfview;
pdfview.displayTwoUp = NO;
pdfview.displaysAsBook = NO;
[pdfview layoutDocumentView];The table below displays Reading Mode types, descriptions, and their corresponding parameter names.
| Type | Description | Parameter Name |
|---|---|---|
| Page continuous | Set whether to add spacing between adjacent pages. | pdfview.isContinueMode |
| Double | Set whether to display two pages of the document side by side. | pdfview.displayTwoUp |
| Book | Set whether to have the cover occupy a separate line in double-page mode. | pdfview.displaysAsBook |
| Scrolling Direction | Set whether to use vertical scrolling or horizontal scrolling. | pdfView.displayDirection |
Crop mode refers to a feature in PDF documents that allows the cropping of pages to alter their visible area or dimensions. Crop mode enables users to define the display range of a page, making it visually more aligned with specific requirements.
This example shows how to set the crop mode:
var pdfview = CPDFView()
pdfview.displayCrop = true
pdfview.layoutDocumentView()CPDFView pdfview;
pdfview.displayCrop = YES;
[pdfview layoutDocumentView];