Hi,

I have built Podofo 0.9.3 for iOS along with all the other needed libraries
to support amrv7, arm64 and simulator. My project runs fine, but my problem
is loading a document for the second time. I always get the error "Catalog
object not found" in Podofo. If I open the document using Preview app on
mac, and save it, Podofo can open it again.

Here's the code I'm using to open the document and save it:

self.doc = new PoDoFo::PdfMemDocument([path UTF8String]);
NSString *tmpPath = [self createCopyForFile:self.pdfPath];

self.doc->Write([tmpPath UTF8String]);
NSData *myFile = [NSData dataWithContentsOfFile:tmpPath];[myFile
writeToFile:tmpPath atomically:YES];
NSFileManager *fileManager = [NSFileManager defaultManager];NSError *error;
if ([fileManager fileExistsAtPath:self.pdfPath] == YES) {
     [fileManager removeItemAtPath:self.pdfPath
error:&error];}[fileManager copyItemAtPath:tmpPath toPath:self.pdfPath
error:&error];

The error is here:

void PdfMemDocument::InitFromParser( PdfParser* pParser
){...PdfObject* pCatalog = pTrailer->GetIndirectKey( "Root" );if(
!pCatalog ){
      PODOFO_RAISE_ERROR_INFO( ePdfError_NoObject, "Catalog object not
found!" );...}

Any idea would be greatly appreciated!
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users

Reply via email to