Knowledge Base and examples

Knowledge Base - Encrypt a pdf (iOS)

This article shows how to Encrypt a pdf.

This feature is available only with Premium License.

// Get Documents directory path

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *documentsDirectory = [paths objectAtIndex:0];

// Set the encrypted file path

NSString *docPath = [documentsDirectory stringByAppendingPathComponent:@"enc_file.pdf"];

// Set the pdf file id

NSString *pdfId = @"123456789abcdefghijklmnopqrstuv";

unsigned char c = [pdfId cStringUsingEncoding:NSUTF8StringEncoding];

// Encrypt the current pdf file

[m_doc encryptAs:docPath :@"user" :@"admin" :0x4 :4 :&c];

Applies To

RadaeePDF SDK for iOS

Related Articles

Encrypt a PDF

Details

Created : 2015-08-04 10:23:52, Last Modified : 2016-02-09 10:17:12