PDF Split-Merge SDK is a component for splitting and merging pages of PDF and PDF/A compliant documents with practical needs then rearrange pages in an arbitrary order to a brand new PDF file. The SDK version provides competent interfaces which can be used in any programming language like C++, Visual Basic, Delphi, ASP and others.
After downloading PDF Split-Merge SDK,please unzip it to computer disk. In the unzipped folder, you can find runtime binary executable code, documentation and examples for C#, VB .NET, and others.
In the unzipped folder, please check the following elements:
Bin: Contains the runtime executable binary code
Example: there are four examples in the subdirectories:
Operating Systems: all the Windows platforms, like Windows 2000, XP, Vista, 7, 10, 11, Windows Server 2003, 2008, 2008 R2 and later systems, both 32 bit and 64 bit.
The following programming languages are supported:C#, VB .NET, MS Visual Basic, Borland Delphi, VBA (MS Office products such as Access) and C++ via COM, C and C++ via native C
Input formats: all the versions of PDF and PDF/A
Output formats: the same as the input formats
Compliance
Standards: ISO 32000-1 (PDF 1.7), ISO 19005-1 (PDF/A-1)
How to Efficiently Use PDF Split-Merge SDK frame in VB and C#?
Here are the sample codes which can be used in VB and C# for your reference.
Private Sub Command1_Click()
Dim szInputPDFFile As String
Dim szOutputPDFFile As String
Dim szPageRange As String
Dim iRet As Long
Dim iPageCount As Long
PDF_SetCode ("Set your License Key at here")
szInputPDFFile = App.Path + "\" + "testcmd.pdf"
szOutputPDFFile = App.Path + "\" + "testcmd-out.pdf"
'iRet = VerySplitMergeSetParameter("RetainBookmarks","on")
'iRet = VerySplitMergeSetParameter("RetainAcroForms","off")
iRet = VerySplitMergeSetParameter("RetainBookmarks", "off")
iRet = VerySplitMergeSetParameter("RetainAcroForms", "on")
iPageCount = VeryGetPDFFilePageCount(szInputPDFFile)
MsgBox "VeryGetPDFFilePageCount() return: " & iPageCount
'Split and merge pdf files
iRet = VerySplitMergePDFEx(szInputPDFFile, "1,3", szOutputPDFFile)
'iRet = VeryAppendPDF(szOutputPDFFile, szInputPDFFile)
'szOutputPDFFile = App.Path + "\"
'iRet = VerySplitMergePDFEx(szInputPDFFile, "burst", szOutputPDFFile)
End Sub
void main()
{
BOOL bRet = FALSE;
char szInPDF[MAX_PATH];
GetModulePath(szInPDF, "testcmd.pdf");
PDF_SetMode(0);
PDF_SetCode("Set your License Key at here");
char szOutPDF1[MAX_PATH];
char szOutPDF2[MAX_PATH];
char szOutPDF3[MAX_PATH];
GetModulePath(szOutPDF1, "out-001.pdf");
GetModulePath(szOutPDF2, "out-002.pdf");
GetModulePath(szOutPDF3, "out-003.pdf");
//Extract pages from an existing PDF file
HPDF hPDF = PDF_Open(szInPDF);
bRet = PDF_ExtractPages(hPDF, szOutPDF1, "1-3");
bRet = PDF_ExtractPages(hPDF, szOutPDF2, "2-6");
bRet = PDF_ExtractPages(hPDF, szOutPDF3, "10");
PDF_Close(hPDF);
//Merge several PDF files into one PDF file
char szMergePDFs[2048];
strcpy(szMergePDFs, szOutPDF1);
strcat(szMergePDFs, "|");
strcat(szMergePDFs, szOutPDF2);
strcat(szMergePDFs, "|");
strcat(szMergePDFs, szOutPDF3);
char szOutMergedPDF[MAX_PATH];
GetModulePath(szOutMergedPDF, "merged1.pdf");
bRet = PDF_MergePDFFiles(szMergePDFs, szOutMergedPDF);
//Extract and merge PDF files together
GetModulePath(szOutMergedPDF, "merged2.pdf");
sprintf(szMergePDFs, "%s*1,2,3,8-10", szInPDF);
bRet = PDF_MergePDFFiles(szMergePDFs, szOutMergedPDF);
}
More examples and usage directions please check them in the download package. If you feel it will be helpful for you, please try and buy it. During the using, if you have any question, please contact us immediately.