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:
procedure TFormMain.FormCreate(Sender: TObject);
PdfDocument := TNatPdfDocument.Create(TPath.Combine(TPath.GetDocumentsPath, 'This_Quantum_World.pdf'));
PdfView := TNatPdfView.Create(PdfDocument, Self);
procedure TFormMain.FormResize(Sender: TObject);
if PdfView <> nil then
PdfView.BoundsRect := ClientRect;
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: