//--------------------------------------------------------------------------------------- // Copyright (c) 2001-2012 by PDFTron Systems Inc. All Rights Reserved. // Consult legal.txt regarding legal and license information. //--------------------------------------------------------------------------------------- #import #import // This sample project illustrates how to recompress bi-tonal images in an // existing PDF document using JBIG2 compression. The sample is not intended // to be a generic PDF optimization tool. // // You can download the entire document using the following link: // http://www.pdftron.com/net/samplecode/data/US061222892.pdf // int main(int argc, char *argv[]) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [PDFNet Initialize: 0]; @try { PDFDoc *pdf_doc = [[[PDFDoc alloc] initWithFilepath: @"../../TestFiles/US061222892-a.pdf"] autorelease]; [pdf_doc InitSecurityHandler]; SDFDoc *cos_doc = [pdf_doc GetSDFDoc]; int num_objs = [cos_doc XRefSize]; int i=1; for(; i