This function is exported by the engine DLL to make it easy to convert PDF pages into JPEG files. No object has to be created and no initialization is required.
You can this function it to convert selected pages to JPEG, optionally also PNG.
Parameters:
filename: the full path to the input PDF file
password: optional user password required to open the PDF file
licname, lickey, liccode: when using registered version use your license data here
destpath: the path to the created image file. The placeholder %d is replaced with the page number
The variable "destpath" should contain the file extension (JPG, JPEG).
Now it is also possible to create PNG files. To do so use the extension PNG.
frompage: the first exported page, 1...
to_page: the last exported page
jpegres: - the resolution for the JPEG file.
the lower word is used for the resolution in dpi. Default is 72.
The lower byte of the higher word is used to select the color depth. It may may have this values: 0 : 24 bit color 1 : 1 bit color 2 : 4 bit color 3 : 8 bit color 4 : 15 bit color 5 : 16 bit color 6 : 24 bit color (default)
Please add 16 to make the resulting image monochrome.
Please add 32 to avoid uneven spaced characters in texts-
The high byte of the high word is used to select the JPEG compression level (ignored for PNG)
This function defined as
Pascal:
function pdfMakeJPEG( filename: PChar; password: PChar; licname, lickey: PChar; liccode: Cardinal; destpath: PChar; frompage, to_page: Integer; jpegres: Integer): Integer; stdcall;
C:
stdcall int pdfMakeJPEG( char *filename, char * password, char * licname, char * lickey, long liccode, char * destpath, int frompage, int to_page, int jpegres);
VB
Declare Function pdfmakejpeg Lib "wPDFViewDemo02.dll" _ Alias "pdfMakeJPEG" _ (ByVal zfilename As String, _ ByVal zpassword As String, _ ByVal zlicname As String, _ ByVal zlickey As String, _ ByVal liccode As Long, _ ByVal zdestpath As String, _ ByVal frompage As Long, _ ByVal To_page As Long, _ ByVal jpegres As Long) As Long
|