PDFKit Removes Line Breaks in Annotations
PDFKit Removes Line Breaks in Annotations
- Subject: PDFKit Removes Line Breaks in Annotations
- From: Stewart Milberger <email@hidden>
- Date: Thu, 20 Apr 2006 16:55:20 -0600
I'm having a problem using PDFKit to correctly read text annotations
(PDFAnnotationText) for pages in a PDF document.
I am creating the text annotations in Adobe Acrobat (as notes) and
the text has multiple lines per annotation. When I examine the PDF
file, it has '\r' characters in the appropriate locations in the text.
When I open the PDF in Preview, which I understand uses PDFKit, the
text annotations (notes) are there, but have the carriage returns are
replaced by spaces.
This is also the case in my application which uses PDFKit:
PDFDocument *pdf_document = [[PDFDocument alloc] initWithURL:url];
.
.
.
PDFPage *page = [pdf_document pageAtIndex:i];
NSArray *annotations = [page annotations];
for (unsigned j = 0; j < [annotations count]; ++j) {
if ([[annotations objectAtIndex:j] isKindOfClass:
[PDFAnnotationText class]]) {
NSString *contents = [[annotations
objectAtIndex:j] contents];
.
.
.
}
The variable contents always has the '\r' characters replaced with
space characters. Anyone have any idea why this is?
Thank you,
Stewart Milberger
Megaptera, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden