|
You can use below codes to convert files with ActMask
ALL2PDF PDF Creator or ActMask Document Converter.
|
Call ShellExecute API
You can call ShellExecute Windows API to convert files (ActMask
Document Converter printer should be set as default printer). To
disable our product's GUI, please enable Automatic Output feature.
For example (C/C++ code):
ShellExecute(NULL, "print", "\"c:\\test.txt\"",
NULL, "", SW_SHOWNOACTIVATE);
ShellExecute(NULL, "print", "\"c:\\test.doc\"",
NULL, "", SW_SHOWNOACTIVATE);
|
|
Convert MS Office Document with VB
or VBA Script
You can execute VB/VBA code below to convert MS Office Document.
To disable our product's GUI, please enable Automatic Output feature.
For example (VB/VBA code):
Private Sub PrintFile(szFileName As String)
Private Sub Command1_Click()
PrintFile "c:\test.doc"
End Sub
Private Sub PrintFile(szFileName As String)
Dim objWord As Word.Application
Dim objDoc As Word.Document
Dim szPrintName As String
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
szPrintName = objWord.ActivePrinter
Set objDoc = objWord.Documents.Add()
ActivePrinter = "ActMask Document Converter"
objWord.PrintOut , , , , , , , , , , , , szFileName
ActivePrinter = szPrintName
objWord.Quit
End Sub
|
|
Call command line
You can execute command line many applications provided to convert
files (ActMask Document Converter Printer should be set as default
printer). To disable our product's GUI, please enable Automatic
Output feature.
For example (C/C++ code):
ShellExecute(NULL, "open", "\"E:\Program Files\Adobe\Acrobat
7.0\Reader\AcroRd32.exe\"", "/p /h \"c:\\test.pdf\"",
"", SW_SHOWNOACTIVATE);
|
|
Render GDI operations on ActMask Document
Converter Printer
For example (C/C++ code):
HDC hDC;
DEVMODE stDevMode;
//Get DevMode first
...
//Then we create a DC
hDC = CreateDC("ActMask", "ActMask Document Converter",
NULL, &stDevMode);
StartDoc(hDC);
StartPage(hDC);
//GDI operations
...
EndPage(hDC);
EndDoc(hDC);
DeleteDC(hDC); |
|