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.
General document methods
Abort
Aborted
AddColorTransformationRule
AddImageFromBitmapHandle
AddImageFromBuffer
AddImageFromFile
AddImageFromFilename
AddImageFromMemory
AddImageWithColorMask
AddImageWithMask
AddTTFFontFromFile
AddTTFFontFromFile2
AddType1FontFromFile
AutoCreateURL
AutoLaunch
BeginDoc
BinaryImage
Compression
CreateWaterMark
CurrentWaterMarkIndex
DocumentInfo_Author
DocumentInfo_CreationDate
DocumentInfo_Creator
DocumentInfo_Keywords
DocumentInfo_Producer
DocumentInfo_Subject
DocumentInfo_Title
EndDoc
FileName
FlipImage
FontEmbedStyle
GenerateInMemoryFile
GetCurrentPageIndex
GetImageCount
GetImageHeight
GetImageResolution
GetImageWidth
GetUsedDC
GetUsedDCResolution
GlyphsToUnicodeStr
HDC
InitialZoom
InitialZoom2
JPEGQuality
LastError
LoadICCProfile
LogActionsAndErrors
LogTextOperation
MakeImageGrayScale
MakeImageNegative
MemoryFileSize
MetafileImagesCompressionType
MetafileImagesJpegCompression
NewPage
NonEmbeddedFonts
NonEmbeddedFonts_Add
NotEmbedAnyFonts
OnePass
OutputByteStream
OwnerPassword
PageCount
PageHeight
PageLayout
PageMode
PageNumber
PageWidth
PlaceImageToCurrentPage
PlayEMF
PrinterForVirtualDC
Printing
ProducePDFA
ProtectionEnabled
ProtectionKeyLength
ProtectionOptions_coAssembly
ProtectionOptions_coCopyInformation
ProtectionOptions_coExtractInfo
ProtectionOptions_coFillAnnotation
ProtectionOptions_coModifyAnnotation
ProtectionOptions_coModifyStructure
ProtectionOptions_coPrint
ProtectionOptions_coPrintHigh
Resolution
SetCurrentPage
SetPDFAOutputIntent
SetPDFXOutputIntent
StartEngine
SwitchedToWatermark
TransformColors
UseCurrentDocumentResolutionForNextPages
UserPassword
UseScreenDC
Version
ViewerPreferences_vpCenterWindow
ViewerPreferences_vpFitWindow
ViewerPreferences_vpHideMenuBar
ViewerPreferences_vpHideToolBar
ViewerPreferences_vpHideWindowUI
Collapse All

This method retrieves the height of the image with the specified index.

Syntax

LONG GetImageHeight (
LONG imageIndex
)
Parameters
imageIndex
Index of the image

Return value
Height of the specified image

Remarks

The index of the image can be retrieved from any image loading method, such as AddImageFromFile.

Equivalent in new interface: IPDFDocument4::GetImageHeight.

Example

How to Get the Dimensions of an Image

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
ind := PDF.AddImageFromFile('picture.gif');
w := PDF.GetImageWidth(ind);
h := PDF.GetImageHeight(ind);
PDF.PDFPAGE_ShowImage(ind, 10, 10, w, h, 0.0);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG ind = PDF->AddImageFromFile("picture.gif");
LONG w = PDF->GetImageWidth(ind);
LONG h = PDF->GetImageHeight(ind);
PDF->PDFPAGE_ShowImage(ind, 10, 10, w, h, 0.0);
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long ind = PDF.AddImageFromFile("picture.gif");
long w = PDF.GetImageWidth(ind);
long h = PDF.GetImageHeight(ind);
PDF.PDFPAGE_ShowImage(ind, 10, 10, w, h, 0.0);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
ind = PDF.AddImageFromFile("picture.gif")
w = PDF.GetImageWidth(ind)
h = PDF.GetImageHeight(ind)
PDF.PDFPAGE_ShowImage ind, 10, 10, w, h, 0.0
PDF.EndDoc

See Also

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