| |
| How to embed Adobe Acrobat into your application. |
 |
How can I embed Adobe Acrobat into my application so users can read PDF files?
This document describes the process on how to use Adobe Acrobat to display files inside of your application.
- First, you will have to ensure that you have the latest version of Acrobat on your machine. You can download it from Adobe.
- Next you will need to import the type library for Acrobat, and be sure to click the Install button to install it into the IDE:
- You can now drop a TPdf component onto your form and use it however you like.
-- Tips --
To set the file that you want open, use the src property, such as:procedure TForm .Button Click(Sender: TObject);
begin
// This example assumes that you have a TOpenDialog
// and TPdf dropped onto your form
OpenDialog .Filter := 'PDF Files (*.pdf)|*.pdf';
if OpenDialog .Execute then
Pdf .src := OpenDialog .FileName;
end;
If you don't want the Acrobat toolbar to be shown, you can call Pdf .setShowToolbar(false); . You can then have custom buttons that allow the user to navigate through the PDF document by calling gotoFirstPage, gotoLastPage, setZoom(percent: Single) , etc. To find out a list of all the functions you can call, open the file that you imported (it is probably called PdfLib_TLB.pas), and look at all the functions in the class TPdf = class(TOleControl) . To easily browse to this file, you can place the cursor over the PdfLib_TLB name in the uses clause and press Ctrl-Enter.
|
|
| Hits/month |
2,500,000+ |
Downloads (Since May 2000) |
7,393,709 |
| Total Files |
6,023 |
| Forum msgs |
7,670 |
| Articles/FAQs |
70+/900+ |
Top Selling Software at Amazon
|