You are here: pdfMerge
Move to: WPViewPDF
If you need to merge different PDF and create one new file you can use the function pdfMerge. It receives the license codes and a list of files (comma delimited) .
The PLUS addon comes with an extra DLL "tiff_to_pdf.dll" which helps to also merge black and white TIF files which were produced by a scanner as if they were PDF files! Please place this DLL in the same directory as the WPViewPDF main DLL.
If you intend to use the pdfMerge function (or the upcoming stamping feature) on an internet or intranet server, you need a special WEB-License. Please see order page.
Declaration of the merge function in VB
Private Declare Function pdfMerge Lib "wPDFViewPlus02.dll" ( _
ByVal strFilenames As String, _
ByVal strNewFile As String, _
ByVal strPassword As String, _
ByVal strLicName As String, _
ByVal strLicKey As String, _
ByVal lngLicCode As Long, _
ByVal lngLicPlusCode As Long, _
ByVal strOptions As String _
) As Long
Tip: If you need to use this method in ASP (not .NET) you can use VB to create a simple ActiveX class which exports just this method.
Public Function pdfMerge_Access(ByVal strFilenames As String, ByVal strNewFile As String) As Long
pdfMerge_Access = pdfMerge(strFilenames, strNewFile, "", LicName, LicKey, LicCode, LicPlusCode, "")
Declaration of the merge function in C
stdcall int pdfMerge(char *filenames, char *newfile, char *password,
char *licname, char *lickey, uint liccode, uint licpluscode,
Declaration of the merge function in Delphi
function pdfMerge(filenames : PChar; newfile : PChar;
licname, lickey: PChar; liccode, licpluscode: Cardinal;
options: PChar): Integer; stdcall;
Declaration of the merge function in C#
// using System.Runtime.InteropServices;
public static extern int pdfMerge(string filenames, string newfile, string password,
string license_name, string license_key, int license_code, int license_plus_code,
filename: a list of filenames separated using comma, each filename in double quotes: "a.pdf","b.pdf","c.pdf"
newfile: the name of the new PDF file which should be created
password: the user password which should be used to open a PDF file
licname: your license name
lickey: the license key
liccode: the license code
licpluscode: the PLUS enable code (not required by WPViewPDF Version 2 PLUS, simply pass 0)
options: a string with options, separated by comma
"DEBUG=1" switches on the debug mode. See debug console for messages
"CHECKEXIST=1" files which do not exist will be ignored
"TIFF2PDF=path" full path to converter DLL
"LOGFILE=path" logs errors in the specified file. Can be combined with DEBUG=1
The Result is >0 if the operation was successful.