PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllAdds a metafile to a PDF document.
|
| HRESULT PDFPAGE_PlayMetaFileEx ( LONG metafileHandle, DOUBLE x, DOUBLE y, DOUBLE scaleX, DOUBLE scaleY ) |
Parameters
metafileHandle
Handle of the metafile to be painted.
x
X coordinate of the drawing position.
y
Y coordinate of the drawing position.
scaleX
Horizontal scale factor.
scaleY
Vertical scale factor.
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This method paints the context of the metafile provided by handle on the page at specified coordinates (x, y) with scaling (scaleX, scaleY).
Analogue in new interface: IPDFDocument4::PlayMetaFileFromHandle.
Example
Converting EMF files
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
HENHMETAFILE hMetafile := GetEnhMetaFile('page.emf');
PDF.PDFPAGE_PlayMetaFileEx(hMetafile, 10, 10, 0.5, 0.5);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
HENHMETAFILE hMetafile = GetEnhMetaFile("page.emf");
PDF->PDFPAGE_PlayMetaFileEx((LONG)hMetafile, 10, 10, 0.5, 0.5);
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
HENHMETAFILE hMetafile = GetEnhMetaFile("page.emf");
PDF.PDFPAGE_PlayMetaFileEx(hMetafile, 10, 10, 0.5, 0.5);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
HENHMETAFILE hMetafile = GetEnhMetaFile("page.emf")
PDF.PDFPAGE_PlayMetaFileEx hMetafile, 10, 10, 0.5, 0.5
PDF.EndDoc
See Also


