PostScope AutoConvert
Converting documents into PDF automatedly

Operating PostScope as automated
PDF converter
In order to convert documents into PDF automatedly,
that means without a human being having to open the
document and to trigger the print process, all you need
is PostScope AutoConvert and some basic knowledge about
programming, no matter which computer language.

Mode of operation: Instructions
for programmers
PostScope AutoConvert offers you a programming interface.
During its installation, library file PoscInterface.dll
is automatically being copied to system directory "System32".
PoscInterface.dll exports the function
ConvertDoc2PDF(
PCHAR sSrcDoc,
PCHAR sOutputFilename,
HWND hwndTargetWindow );
with which you can - from within your own program -
automatically open document sSrcDoc in the PC-application
(for example MS Word) corresponding to its file type
(for example *.doc), and therein trigger the print process,
which finally generates output file sOutputFilename.pdf.
After termination of the print process, PoscInterface.dll
by means of calling API function
PostMessage(
hwndTargetWindow,
MSG_FINISHED,
(WPARAM) GlobalAddAtom( sOutputFilename ),
(LPARAM) TRUE );
notifies your application (hwndTargetWindow), that
the print process was terminated (MSG_FINISHED)
successfully (TRUE), so that your application can react
on it - if necessary - by calling API function
GetMessage( ... , MSG_FINISHED,
);
Details about the parameters of function:
ConvertDoc2PDF(
PCHAR sSrcDoc,
PCHAR sOutputFilename,
HWND hwndTargetWindow );
sSrcDoc:
- File name including path and file name extension
of the file supposed to be printed, for example C:\My
folder\draft contract.doc
- If NULL, then no print process is triggered.
sOutputFilename:
- File name including path of the file supposed to
be put out, for example C:\My Archive\contract.
- File name extension ".pdf" is being appended
automatically to sOutputFilename.
- If NULL, then the output file name is generated
according to current printer settings.
hwndTargetWindow:
- Window handle of the executable file supposed to
be notified on termination of print process by calling
PostMessage(
hwndTargetWindow,
MSG_FINISHED,
WPARAM wParam,
LPARAM lParam );
where:
- #define MSG_FINISHED WM_USER+0x117
- wParam:
If sOutputFilename != NULL,
then (WPARAM) GlobalAddAtom( sOutputFilename ),
otherwise 0
- lParam:
In case of successful termination of print process
TRUE,
otherwise FALSE
After installation, source code templates are
available in directories
[Installation path]\DriverLab\PostScope PDF Dispatch
Engine\Interface\Delphi
[Installation path]\DriverLab\PostScope PDF Dispatch
Engine\Interface\Visual Basic
[Installation path]\DriverLab\PostScope PDF Dispatch
Engine\Interface\Visual C++
In these directories there are also executables CallDll.exe,
or DllCall.exe respectively, build from these
source code templates. Test them in the following way:
- Make sure folder "C:\Temp" exists on your
computer.
- Start one of the 3 executable files, for example
[Installation path]\DriverLab\PostScope PDF Dispatch
Engine\Interface\Visual Basic\DllCall.exe
- Click button "Trigger Print Process" therein,
whereupon sample document
[Installation path]\DriverLab\PostScope PDF Dispatch
Engine\Interface\Visual Basic\SourceDoc.doc
is converted into
C:\Temp\DestinationPDF.pdf
After termination of print process a message box
appears, displaying supplement information.
Note:
On developing your own application please don´t
start your application, which loads PoscInterface.dll,
from within the integrated development environment -
especially not from within Delphi RAD - but build the
exe-file first, and only after that start it by doubleclicking.

Regular version and AutoConvert
version
The AutoConvert version of PostScope has other default
settings than the regular version, but in principle
it can be operated also "manually"
like the regular version.
Regular version and AutoConvert version of PostScope
are registered by the same registration key, and thus
also cost the same.
 
|