Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
PDF Creator Pilot 3 Knowledge Base
How to Insert an Image into a PDF

See Also
Collapse All

Any image, created in your own programs or stored in external files, can be inserted into a PDF document.

1. If you have an image in an external file, you can load the image into PDF engine memory using the AddImageFromFileName method. Another way is to use images in your program memory with the AddImageFromMemory method, or other methods, to get an image index.

Delphi :

J := PDF.AddImageFromFileName('chart.jpg', itcJpeg);
{ or }
J := PDF.AddImageFromMemory(Buffer, BufLen, itcJpeg); 

Visual Basic or Visual Basic Script :

J = PDF.AddImageFromFileName("chart.jpg", 1)
' or
J = PDF.AddImageFromMemory(Buffer, BufLen, 1) 

C/C++ :

LONG J = PDF->AddImageFromFileName("chart.jpg", itcJpeg);
// or
LONG J = PDF->AddImageFromMemory(Buffer, BufLen, itcJpeg);

C# :

long J = PDF.AddImageFromFileName("chart.jpg", itcJpeg);
// or
long J = PDF.AddImageFromMemory(Buffer, BufLen, itcJpeg);

2. Show your image anywhere in the PDF workplace using the PDFPAGE_ShowImage method.

Delphi :

PDF.PDFPAGE_ShowImage(J, 5, 5, 205, 155, 0);

Visual Basic or Visual Basic Script :

PDF.PDFPAGE_ShowImage J, 5, 5, 205, 155, 0 

C/C++ :

PDF->PDFPAGE_ShowImage(J, 5, 5, 205, 155, 0);

C# :

PDF.PDFPAGE_ShowImage(J, 5, 5, 205, 155, 0);

For more details see PDF page methods

See Also

Reference

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots