ActMask EMF2PDF SDK, 4 steps to convert EMF files (Enhanced-Format Metafiles) to PDF format. Professional quality, 40/128 bits encryption, easy to use.
Designed for Win 9X/2K/XP/2003/Vista
Highlights
1. Easy to use, 4 steps to convert EMF files to professional-quality searchable PDF format.
2. Provide conversion progress.
3. Create you own PDF Document Description (Title, Author, Subject, Keywords ...).
4. 40 / 128 bits PDF encryption (security) support.
5. PDF Version 1.2 - 1.5 support.
6. PDF Document Restriction (Permission) support.
7. PDF Document Owner Password and Reader Password support.
8. PDF Optimization options support.
9. PDF content, resolution and image compression support.
10. Font embedding support.
11. Font subset embedding for Unicode character support.
12. More clear font.
4 Steps to convert EMF files to PDF !
To create PDF file from EMF files, just call below code (C/C++). To learn more detailes or features, please see sample projects.
HANDLE hPDF = NULL;
BOOL bRet = FALSE;
hPDF = CreatePDFFile();
if (hPDF)
{
AddEMFFile(hPDF, "c:\\actmask\\aaa.emf");
AddEMFFile(hPDF, "c:\\actmask\\abcd.emf");
bRet = SavePDFFile(hPDF, "c:\\test.pdf", NULL);
ClosePDFFile(hPDF);
}
Convert EMF files to PDF with parameters specified
To create PDF file from EMF files, just call below code (C/C++). To learn more detailes or features, please see sample projects.
stPDFOption stPDFOption;
HANDLE hPDF = NULL;
BOOL bRet = FALSE;
memset(&stPDFOption, 0, sizeof(stPDFOption));
stPDFOption.pszPassOwner = "owner pass";
stPDFOption.pszPassUser = "user pass";
m_stPDFOption.dwJPEGQuality = 85;
m_stPDFOption.bCompressContent = TRUE;
m_stPDFOption.bCompressImages = TRUE;
...
hPDF = CreatePDFFile();
if (hPDF)
{
AddEMFFile(hPDF, "c:\\actmask\\aaa.emf");
AddEMFFile(hPDF, "c:\\actmask\\abcd.emf");
bRet = SavePDFFile(hPDF, "c:\\test.pdf", &stPDFOption);
ClosePDFFile(hPDF);
}
Files
EMF2PDFDLL.h |
\Samples\Include |
|
EMF2PDFDLL.lib |
\Samples\Lib\VC |
VC version |
|
\Samples\Lib\BCB |
BCB version |
ActMask EMF2PDF SDK Functions
HANDLE WINAPI CreatePDFFile();
BOOL WINAPI AddEMFFile(HANDLE hPDFFile, TCHAR *pszEMFFileName);
BOOL WINAPI SavePDFFile(HANDLE hPDFFile, TCHAR *pszPDFFileName, stPDFOption *pstOption);
void WINAPI ClosePDFFile(HANDLE hPDFFile);
The CreatePDFFile function creates a PDF file. The function returns a handle that can be used to access an object.
Return Value:
If the function succeeds, the return value is a handle.
If the function fails, the return value is NULL.
The AddEMFFile function adds EMF files to list.
Return Value:
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
The SavePDFFile function converts EMF file(s) added to PDF file with filename and options you specified.
Return Value:
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE.
The ClosePDFFile function closes an open object handle.
Struct
struct stPDFOption
{
HWND hMessageWnd;
UINT uiMessageID;
TCHAR *pszVer;
TCHAR *pszTitle, *pszSubject, *pszKeywords, *pszAuthor, *pszCreator;
DWORD dwEncryption, dwPermissions;
TCHAR *pszPassOwner, *pszPassUser;
DWORD dwJPEGQuality;
BOOL bCompressContent, bCompressImages;
BOOL bEmbedFont;
BOOL bUnicodeSubset;
BOOL bSupportAsian;
};
Can be NULL. EMF2PDF SDK calls Windows API PostMessage to post information about amounts of pages and processing progress to the window handle you specified so that you can provide users with visual feedback about the progress of a procedure.
The uiMessageID specifies the message to be posted if you provided hMessageWnd.
Values:
1. wParam > 0, lParam = 0: Indicates amounts of pages will be processed.
2. wParam = 0, lParam = n (n>0): Indicates page n was processed.
3. wParam = 0, lParam = 0: Indicates all pages were processed.
PDF document version, "1.2" - "1.5"
Properties of PDF document
Specify how to set encryption and permissions for the PDF file
Owner password and User password
Set quality of JPEG picture within the PDF file, 0 - 100
Specifies if compresses the document content or images within the PDF file.
Specifies if embeds fonts into the PDF file.
Specifies if embeds a "subset" of a font for any Unicode character.
Set it as TRUE to supports Asian characters if bMultiByteOnly equals to TRUE.