Revision: 2909
http://skim-app.svn.sourceforge.net/skim-app/?rev=2909&view=rev
Author: hofman
Date: 2007-09-12 09:33:23 -0700 (Wed, 12 Sep 2007)
Log Message:
-----------
Write root dictionary at the end of the FDF string and number annotations from
1.
Modified Paths:
--------------
trunk/SKDocument.m
Modified: trunk/SKDocument.m
===================================================================
--- trunk/SKDocument.m 2007-09-12 14:21:48 UTC (rev 2908)
+++ trunk/SKDocument.m 2007-09-12 16:33:23 UTC (rev 2909)
@@ -1377,17 +1377,16 @@
- (NSString *)notesFDFStringForFile:(NSString *)filename {
NSArray *fileIDStrings = [self fileIDStrings];
int i, count = [[self notes] count];
- NSMutableString *string = [NSMutableString
stringWithFormat:@"%%FDF-1.2\n%%%C%C%C%C\n1 0 obj<</FDF<<", 0xe2, 0xe3, 0xcf,
0xd3];
- [string appendString:@"/Annots["];
- for (i = 0; i < count; i++)
- [string appendFormat:@"%i 0 R ", i + 2];
- [string appendFormat:@"]/F(%@)", filename ? [filename
stringByEscapingParenthesis] : @""];
+ NSMutableString *string = [NSMutableString
stringWithFormat:@"%%FDF-1.2\n%%%C%C%C%C\n", 0xe2, 0xe3, 0xcf, 0xd3];
+ NSMutableString *annots = [NSMutableString string];
+ for (i = 0; i < count; i++) {
+ [string appendFormat:@"%i 0 obj<<%@>>\nendobj\n", i + 1, [[[self
notes] objectAtIndex:i] fdfString]];
+ [annots appendFormat:@"%i 0 R ", i + 1];
+ }
+ [string appendFormat:@"%i 0 obj<</FDF<</[EMAIL PROTECTED]/F(%@)", i + 1,
annots, filename ? [filename stringByEscapingParenthesis] : @""];
if (fileIDStrings)
[string appendFormat:@"/ID[<%@><%@>]", [fileIDStrings
objectAtIndex:0], [fileIDStrings objectAtIndex:1]];
- [string appendString:@">>>>\nendobj\n"];
- for (i = 0; i < count; i++)
- [string appendFormat:@"%i 0 obj<<%@>>\nendobj\n", i + 2, [[[self
notes] objectAtIndex:i] fdfString]];
- [string appendString:@"trailer\n<</Root 1 0 R>>\n%%EOF\n"];
+ [string appendFormat:@">>>>\nendobj\ntrailer\n<</Root %i 0 R>>\n%%EOF\n",
i + 1];
return string;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
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-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit