Question:I'm trying to implement a PDF output target in an existing application which uses Windows metafiles (specifically, Aldus Placeable Metafiles) as one of its inputs. Is there a pre-existing library to render such metafiles to a Cairo surface (or some other PDF rendering library)? Is there any solution on VeryDOC?
Answer: When you need to convert Metafile to PDF by some library, you do not need to converting metafiles to a Cairo surface first and then to PDF as VeryDOC software Metafile to PDF Converter can help you convert Metafile to PDF directly. By this software, we can also convert EMF, WMF and RTF files to Adobe PDF files. Metafile (EMF, WMF) to PDF supports the usual PDF features, including compression and 128 bit encryption and it was the first command line application to allow embedding of font subsets to reduce file size. Please check more information of this software on homepage, in the following part, I will show you how to use this software.
Step 1. Free download Metafile to PDF Developer License
- When you need to use the library, please download the developer version. For uploading and downloading easily, we have compressed it to zip file.
- When downloading finishes, please extract it to some folder then you can call it normally.
Step 2. Converting Metafile to PDF easily.
- This converter is available via an easily integrated COM object (or DLL Library, or Command Line), enabling developers to access the converter via any programming or scripting languages, such as Visual Basic, C/C++, Delphi, ASP, PHP, C#, .NET, etc. Using the COM object (or DLL Library, or Command Line), file conversions can be done consecutively or simultaneously.
- For showing conversion easily, here I will take the command line version parameters for example. Please check source code examples in download extracted folder.
- When converting Metafile to PDF, please refer to the following command line templates and parameters:
emf2pdf.exe C:\in.emf C:\out.pdf
emf2pdf.exe C:\*.emf C:\*.pdf
emf2pdf.exe -append 2 -width 612 -height 792 C:\*.emf C:\out.pdf
emf2pdf.exe -append 2 C:\*.emf C:\out.pdf
Here are some parameters for your reference:
-width <int> : Set page width to PDF file
-height <int> : Set page height to PDF file
-margin <string> : Set page margin to PDF file
-margin 10 : Set margin to 10pt to left
-margin 10x10 : Set margin to 10pt to left,top
-margin 10x10x10 : Set margin to 10pt to left,top,right
-margin 10x10x10x10 : Set margin to 10pt to left,top,right,bottom
Please check more parameters and usage on homepage, I can not list all of them here as there are too many. During the using, if you have any question, please contact us as soon as possible.