Re: Error when saving FDF as XFDF

86 views
Skip to first unread message

Support

unread,
Apr 18, 2013, 1:55:21 PM4/18/13
to pdfne...@googlegroups.com

I actually dont want to export anything to do with the embedded videos, a

To exclude rich media annots you could traverse all annotations before export to FDF / XFDF and temporarily remove references to these annotations from page (see Annotation sample project - http://www.pdftron.com/pdfnet/samplecode.html#Annotation).

 
 

On Thursday, April 18, 2013 8:34:06 AM UTC-7, [email address] wrote:
Hi,

I have just tested working code with another PDF, one which contains a Rich Media annotation (an embedded video) and my app now crashes in this function (see the comment). This is an iOS app.

-(void)exportAnnotations{

    if([Utils IsConnectedToInternet]){

        NSString *docFilename = @"document";

        FDFDoc *doc = [docToOpen FDFExtract:e_annots_only];

        [doc SetPDFFileName:[NSString stringWithFormat:@"%@/%@.pdf", pdfFolder, docFilename]];

        [doc SaveFDFDocToFile:[NSString stringWithFormat:@"%@/%@.fdf", pdfFolder, docFilename]];

        [doc SaveAsXFDF:[NSString stringWithFormat:@"%@/%@.xfdf", pdfFolder, docFilename]]; //Crash here

        //More code which i have not included to do with uploading the saved .xfdf file

    }

}


and shows this in the console:

*** Terminating app due to uncaught exception 'PDFNet Exception', reason: 'GetAt() can't be invoked on Obj of this type.'


When I say "working code" I mean code which works perfectly well with a 2 different PDFs which don't contain an embedded video.


I actually dont want to export anything to do with the embedded videos, as I guess it will bloat the .xfdf file I am uploading (which needs to be small as its frequently uploaded). So, if the problem is the embedded video, I guess my real question is: How can I export annotations to an XFDF file, but exclude any rich media annotations?


Thanks,


Mike

Reply all
Reply to author
Forward
0 new messages