Knowledge Base and examples

Knowledge Base - How to use OpenMem method (iOS)

This article shows how to use OpenMem method to open pdf with data (note: the pdf will be readonly).


            //Open PDF from Mem demo

            const char *path1 = [pdfFullPath UTF8String];

            FILE *file1 = fopen(path1, "rb");

            fseek(file1, 0, SEEK_END);

            long filesize1 = ftell(file1);

            fseek(file1, 0, SEEK_SET);

            buffer = malloc((filesize1)*sizeof(char));

            fread(buffer, filesize1, 1, file1);



            int result = [m_pdf PDFopenMem: buffer :(int)filesize1 :nil];

Applies To

RadaeePDF SDK for iOS


Created : 2016-06-22 10:11:49, Last Modified : 2016-06-22 10:18:24