Home
We need your feedback!

PDFDoc Scout

PDFDoc Scout screenshot (click to enlarge)


Subscribe to Our Bi-Monthly Newsletter (tips, new releases, specials):
 Subscribe in a reader
 PRODUCTS  |  DOWNLOAD  |  PURCHASE  |  SUPPORT  |  TESTIMONIALS   |  NEWS  | 

PDFDoc Scout library - Sample

Download Free Trial See Licensing Options More Information

How to convert EMF (metafiles) to PDF document using PDFDoc Scout library: 

You can download the source code of this example here: pdfdocscout_emf2pdf.zip 

This example shows how to convert EMF metafile into PDF document with PDFDoc Scout library

Generated PDF file consists of EMF converted into PDF using PDFDoc Scout:

Sample EMF metafile with text, vector and raster images converted into PDF document using PDFDoc Scout library

Code to convert EMF file to PDF:

' this example uses PDFDoc Scout to convert vector based EMF metafile image into PDF format

Set PDFDoc = CreateObject("PDFDocScout.PDFDocument")

PDFDoc.InitLibrary "demo", "demo"
PDFDoc.OutputFileName = "Metafile_EMF2PDF.pdf"
PDFDoc.DocumentInfo.Title = "PDFDoc Scout - EMF2PDF Demo"
PDFDoc.AutoOpenGeneratedPDF =True

PDFDoc.BeginDocument

' read information about EMF file
Set EMFFileInfo = CreateObject("PDFDocScout.EMFFileInfo")
EMFFileInfo.LoadFile "SampleMetafile.emf"
EMF_Width = EMFFileInfo.Width
EMF_Height = EMFFileInfo.Height
EMF_Resolution = EMFFileInfo.Resolution
Set EMFFileInfo = nothing

' set page size to EMF size
PDFDoc.Page.Width = EMF_Width
PDFDoc.Page.Height = EMF_Height

PDFDoc.Page.PlayMetaFileToHDCEx "SampleMetafile.emf", 0,0, EMF_Resolution / PDFDoc.Resolution, EMF_Resolution / PDFDoc.Resolution

PDFDoc.EndDocument

Set PDFDoc = nothing

You can download the source code of this example here: pdfdocscout_emf2pdf.zip 

Download Free Trial See Licensing Options More Information


See also: Bytescout.PDF - native .NET library to write/read/sign/
modify/merge/split PDF documents (but no HTML2PDF support)



On-line documentation (HTML format)


"Hello, World!" quick start step-by-step tutorials:


HOME  |  CONTACT US

Copyright © ByteScout, 2003-2010. Privacy Statement
Microsoft®, Windows®, Windows 2000®, Windows Server®, Windows Vista®, Internet Explorer®, .NET Framework®, ActiveX®, Visual Basic®, Visual C#®, ASP®, ASP.NET®, Excel®, PowerPoint®, are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Adobe®, Flash® and Acrobat® are registered trademarks of Adobe Systems, Incorporated. Mozilla®, Firefox® and the Mozilla and Firefox Logos are registered trademarks of the Mozilla Foundation. Other product names or brandnames used herein are for identification purposes only and might be trademarks or registered trademarks of their respective companies. We disclaim any and all rights to those marks.