Combining multiple PDF documents into a single file is a common requirement across industries—from legal and financial sectors to engineering and education. However, one of the major challenges many developers and end-users face is dealing with PDF files that contain digital signatures. Most merging tools either invalidate the signature or create a corrupt output. Fortunately, VeryPDF’s PDF Editor Toolkit Pro SDK solves this problem with its advanced VerySplitMergePDF
function, which now fully supports PDF files with embedded digital signatures.
In this article, we’ll walk you through how to successfully merge digitally signed PDF files using PDF Editor Toolkit Pro SDK. This guide is based on a real customer support case that involved resolving issues with corrupted outputs when merging such PDFs.
https://www.verypdf.com/app/pdf-editor-toolkit/
Why This Matters
Digital signatures provide legal authenticity and document integrity. Tampering or even merely merging PDF files that contain signatures can break their cryptographic validation. Using a merging tool that understands and preserves digital signatures is therefore critical—and that’s exactly what VeryPDF's toolkit offers.
Step-by-Step Guide to Combine Signed PDF Files
Follow the instructions below to test and integrate this functionality in your workflow.
1. Download the Latest PDF Editor Toolkit Pro SDK
Get the latest version from the official Dropbox link provided by VeryPDF support:
https://www.verypdf.com/app/pdf-editor-toolkit/
Unzip the archive to a convenient directory on your system.
2. Register the PDFShell COM Component
Navigate to the bin
directory inside the unzipped folder and run the registration script:
pdf_editor_toolkit_pro\bin\Install-pdfshell.exe-Com.vbs
This registers the pdfshell2.shellexe
COM object, which is essential for executing PDF merging and manipulation functions via scripting.
Install-pdfshell.exe-Com.vbs contains following contents,
'REM ------------------------------------------- 'REM Please run a cmd window by administrator privilege, and then run following command line to register pdfshell.exe into your system 'REM ------------------------------------------- ' ' pdfshell.exe /regserver ' strFolder = ExtractFilePath(WScript.ScriptFullName) strExe = """" & strFolder & "\pdfshell.exe" & """" Set UAC = CreateObject("Shell.Application") UAC.ShellExecute "cmd.exe", "/c " & strExe & " /regserver", "", "runas", 1 On Error Resume Next Set oPDF = CreateObject("pdfshell2.shellexe") If Err.Number <> 0 Then MsgBox "An error occurred to register COM component: " & Err.Description Else MsgBox "Register COM component success!" End If '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Function ExtractFilePath(PathName) For x = Len(PathName) To 1 Step -1 If Mid(PathName, x, 1) = "\" Then Exit For Next ExtractFilePath = Left (PathName, x - 1) End Function
3. Create a VBS Script to Merge PDFs
Create a .vbs
script file using any text editor. For example, name it test-VerySplitMergePDF3.vbs
. Replace the file paths with your own source and output PDF file paths.
Set fso = CreateObject("Scripting.FileSystemObject")
strFolder = fso.GetParentFolderName(wscript.ScriptFullName)
InputPDF1 = "D:\downloads\subcontractorPDF.pdf"
InputPDF2 = "D:\downloads\Invoice_20250507.pdf"
OutputPDF = "D:\downloads\_out.pdf"
Set oPDF = CreateObject("pdfshell2.shellexe")
oPDF.com_VerySetLicenseKey("XXXXXXXXXXXXXXXXXXXXX") ' Replace with your actual license key
strMergeCommand = ""
strMergeCommand = strMergeCommand & """" & InputPDF1 & """ "
strMergeCommand = strMergeCommand & """" & InputPDF2 & """ "
strMergeCommand = strMergeCommand & """" & OutputPDF & """"
MsgBox(strMergeCommand)
bresult = oPDF.com_VerySplitMergePDF(strMergeCommand)
MsgBox "com_VerySplitMergePDF() returned: " & CStr(bresult)
Make sure your input PDF files are accessible and that at least one of them includes a digital signature to test signature handling.
4. Run the Script Using Windows Command Line
Execute the script using the Windows Script Host:
cscript.exe test-VerySplitMergePDF3.vbs
If everything is set up correctly, a new output file will be created with the merged content, and your digital signatures will remain intact.
What to Do If You Don't Have a License Key?
If you haven’t received your license key or lost it, please email your Order ID to the VeryPDF support team. They will resend the license key to you promptly.
Email: support@verypdf.com
Real-World Use Case
This tutorial originated from a real customer issue (#144986), where merging digitally signed PDFs was resulting in corrupted files using the previous version of the SDK. After testing the latest version of PDF Editor Toolkit Pro SDK, the problem was resolved using the method described above. The customer confirmed the tool worked successfully with digitally signed documents.
Conclusion
When dealing with digital documents in regulated or high-integrity environments, preserving digital signatures during PDF processing is non-negotiable. VeryPDF's PDF Editor Toolkit Pro SDK is a powerful solution tailored for developers and IT teams that need robust control over PDFs, including:
- Secure merging of digitally signed files
- Easy integration through COM interface
- Scriptable automation using VBS or other programming languages
If you're facing similar challenges in your document processing workflows, we highly recommend testing the latest version of PDF Editor Toolkit Pro SDK.
If you have any further questions or technical challenges, don’t hesitate to reach out. The VeryPDF team is here to help.