 |
| Example 2: Split a PDF file into single pages and encrypt output (VC++) |
|
 |
#include "stdafx.h"
#using <mscorlib.dll>
#import "PDFmerge.tlb" no_namespace named_guids
using namespace System;
int _tmain()
{
IPDFsplitPtr NVSplit;
::CoInitialize(NULL);
NVSplit.CreateInstance(__uuidof(PDFsplit));
NVSplit->PutPDFEncrypt(true);
NVSplit->PutPDFEncryptionType("rc4");
NVSplit->PutPDFOwnerPassword("owner");
NVSplit->PutPDFPermissions("pe");
NVSplit->SplitPDF("c:\\1.pdf", "c:\\out\\");
Console::WriteLine(S"Done.");
return 0;
}
|
|
 |
|