Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Images
Collapse All

Retrieves the number of images in the current PDF document.

Syntax

LONG GetImageCount ()
Return value
Number of images in PDF document's collection.

Example

PDF object is supposed to be created

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
i1 := PDF.AddImageFromFile('picture.gif');
PDF.AddImageFromFile('other_1.gif');
PDF.AddImageFromFile('other_2.gif');
{ add some more pictures               }
PDF.AddImageFromFile('other_N.gif');

n := i1 + PDF.GetImageCount;
for i := i1 to n-1 do
begin
    PDF.ShowImage(i, 10, 100*(i-i1));
end;
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long i1 = PDF->AddImageFromFile("picture.gif");
PDF->AddImageFromFile("other_1.gif");
PDF->AddImageFromFile("other_2.gif");
// add some more pictures
PDF->AddImageFromFile("other_N.gif");

long n = i1 + PDF->GetImageCount();
for (long i = i1; i < n; i++)
{
    PDF->ShowImage(i, 10, 100*(i-i1));
}
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long i1 = PDF.AddImageFromFile("picture.gif");
PDF.AddImageFromFile("other_1.gif");
PDF.AddImageFromFile("other_2.gif");
// add some more pictures
PDF.AddImageFromFile("other_N.gif");

long n = i1 + PDF.GetImageCount();
for (long i = i1; i < n; i++)
{
    PDF.ShowImage(i, 10, 100*(i-i1));
}
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
i1 = PDF.AddImageFromFile("picture.gif")
PDF.AddImageFromFile("other_1.gif")
PDF.AddImageFromFile("other_2.gif")
' add some more pictures
PDF.AddImageFromFile("other_N.gif")

n = i1 + PDF.GetImageCount()
For i = i1 To n-1
    PDF.ShowImage i, 10, 100*(i-i1)
Next
PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots