On 8 Sep 2007, at 8:01 PM, Adam R. Maxwell wrote: > > On Sep 8, 2007, at 09:23, Christiaan Hofman wrote: > >> >> On 8 Sep 2007, at 5:17 PM, Adam R. Maxwell wrote: >> >>> >>> On Sep 8, 2007, at 03:47, Christiaan Hofman wrote: >>> >>>> What is the best procedure to transform an octal or hexadecimal >>>> code >>>> (as in \ddd or A3) interpreted in a given encoding (which may >>>> not be >>>> UTF-8) into a character to be added to an NSString? >>> >>> You can parse those (the hex/octal strings) as ASCII, right? Since >>> those are just integers (chars), add each one to an NSData, then >>> intepret that as some encoding. Maybe I've misunderstood the >>> problem, >>> though. >>> >> >> The parsing is no problem, that's just an NSScanner. I've now used - >> [NSString initWithBytes:length:encoding:]. It should be alright with >> the size, as the octal is at most 3 characters (excluding the "\") >> and the hex is 2 characters long. It's in the new SKFDFParser object. > > I'm not on skim commits at home, so I missed that :). That sounds > like the same idea, though, using a C array instead of NSData. > > So did you find some sample FDF files? I'm curious now; from the > parser code, it looks like they're similar to CGPDF dictionaries, but > a quick google search says they're for PDF forms. > > -- adam
There is one attached to the RFE. It's the same format as used for annotations inside the PDF, though with some more restrictions to the global FDF file. And in turn the data basically build out of PS data structures. They can also be used to export form information separately, but we just ignore that part. So CGPDFDictionary should be directly derived from the PDF, therefore it's no surprise they look similar. Though I never looked at CGPDFDictionaries actually (I wonder i f some things could have been easier using the private CGPDFDictionary in the PDFAnnotation). I haven't tried importing the FDF files anywhere yet (Skim or Acrobat). Christiaan ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ skim-app-develop mailing list skim-app-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-develop