1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include "stdafx.h" #using <mscorlib.dll> #import "PDFmerge.tlb" no_namespace named_guids using namespace System; int _tmain() { IPDFmergePtr NVMerge; ::CoInitialize(NULL); NVMerge.CreateInstance(__uuidof(PDFmerge)); NVMerge->PutPDFEncrypt(true); NVMerge->PutPDFEncryptionType("rc4"); NVMerge->PutPDFOwnerPassword("owner"); NVMerge->PutPDFPermissions("pe"); NVMerge->MergePDF("c:\\1.pdf+c:\\2.pdf", "c:\\merged.pdf"); Console::WriteLine(S"Done."); return 0; } |