Developer Tools
|
Office Productivity Applications
|
Platform-Agnostic APIs
|
Home | Online Demos | Downloads | Buy Now | Support | About Us | News | Working Together | Contact Us
XtremeDocumentStudio Delphi is the next-generation multi-format document-processing framework for Delphi/C++Builder developers. Initially, it was released with viewing, printing and conversion functions. Later, we added creation and editing functions as a preview feature (part of the "Ultimate" edition).
One of the most requested feature from our customers and visitors to our Delphi-Tage booth was a FireMonkey version of the document viewer. In October this year, we released a multi-format FireMonkey document viewer component as a preview. In iOS, Mac OS X and Windows, the FireMonkey viewer supports PDF and image formats. In Android, only images are supported. Optionally, DOCX and PDF can be supported on all platforms when the backend is plugged with Gnostice StarDocs Document Server, our REST-based document-processing solution. This StarDocs integration requires just a StarDocs-specific unit and no further changes to your code.
In this article, you will learn to create a simple a multi-format multi-platform viewer using the FMX document viewer component. The viewer will allow an end-user to select a file and display it in the viewer on Windows and Mac. In IOS, it will open a document embedded in the app.
Here are the steps you need to follow:
procedure TForm5.Button1Click(Sender: TObject); var oStream: TResourceStream; begin {$IFDEF IOS} try begin oStream := TResourceStream.Create(HInstance, 'sampledoc', RT_RCDATA); // Load document from internal resource stream gtDocumentViewer1.LoadFromStream(oStream); end; except on Err:Exception do begin ShowMessage('Error: ' + Err.Message); end; end; {$ELSE} // Set file open dialog filter OpenDialog1.Filter := 'Supported formats|*.docx;*.pdf;*.bmpg;*.png;*.jpg;*.jpeg|'+ 'Word DOCX files|*.docx|Acrobat PDF files|*.pdf|'+ 'Images|*.bmp;*.png;*.jpg;*.jpeg|All files|*.*'; // Display the dialog If (OpenDialog1.Execute) then begin try begin // Load document selected by user gtDocumentViewer1.LoadFromFile(OpenDialog1.FileName); Caption := OpenDialog1.FileName; end; except on Err:Exception do begin ShowMessage('Error: ' + Err.Message); end; end; end; {$ENDIF} end;
---o0O0o---
Our .NET Developer Tools | |
---|---|
Gnostice Document Studio .NETMulti-format document-processing component suite for .NET developers. |
PDFOne .NETA .NET PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, and bookmark PDF documents in .NET applications. |
Our Delphi/C++Builder developer tools | |
---|---|
Gnostice Document Studio DelphiMulti-format document-processing component suite for Delphi/C++Builder developers, covering both VCL and FireMonkey platforms. |
eDocEngine VCLA Delphi/C++Builder component suite for creating documents in over 20 formats and also export reports from popular Delphi reporting tools. |
PDFtoolkit VCLA Delphi/C++Builder component suite to edit, enhance, view, print, merge, split, encrypt, annotate, and bookmark PDF documents. |
Our Java developer tools | |
---|---|
Gnostice Document Studio JavaMulti-format document-processing component suite for Java developers. |
PDFOne (for Java)A Java PDF component suite to create, edit, view, print, reorganize, encrypt, annotate, bookmark PDF documents in Java applications. |
Our Platform-Agnostic Cloud and On-Premises APIs | |
---|---|
StarDocsCloud-hosted and On-Premises REST-based document-processing and document-viewing APIs |
Privacy | Legal | Feedback | Newsletter | Blog | Resellers | © 2002-2024 Gnostice Information Technologies Private Limited. All rights reserved. |