- Introduction
Native PDF library supports iOS only. It uses PDFKit framework. In the next short you will find installation instructions on how to add the library in the Rad Studio.
2. Components in the Demo and what they do.
This Demo does not contain any components in Design-time. It is a simple project which executes the main code in the FormCreate event, as well as FormResize Event, in which In Design-time, there are no components in this Demo. The main code is executed in the FormCreate event, as well as the FormResize Event, in which the PDF can be resized – zoomed in, zoomed out, and moved in all directions. The FormCreate event makes use of the Native PDF Library. A TNatPdfDocument object is created, whose constructor requires the Filename and password as parameters. By default, the password field is empty. The app displays the resulting pdf document. The pdf file must be placed in the project’s src folder and deployed with the Remote Path: StartUpDocuments.
The executed code in the Demo can be found below:
1 2 3 4 5 6 7 8 9 10 11 |
procedure TFormMain.FormCreate(Sender: TObject); begin PdfDocument := TNatPdfDocument.Create(TPath.Combine(TPath.GetDocumentsPath, 'This_Quantum_World.pdf')); PdfView := TNatPdfView.Create(PdfDocument, Self); FormResize(Self); end; procedure TFormMain.FormResize(Sender: TObject); begin if PdfView <> nil then PdfView.BoundsRect := ClientRect; end; |
In a short video you will see the Demo in action, reading PDF document with zoom in, zoom out, etc.
The Demo can be found and downloaded from the link below:
Head over and download the library for viewing PDFs on iOS from WINSOFT.
View PDFs on iOS with Native PDF Library in the Delphi or C++ environments with firemonkey’s Native Ios App Builder. Try the free tool here.
Design. Code. Compile. Deploy.
Start Free Trial Upgrade Today
Free Delphi Community Edition Free C++Builder Community Edition