• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
PDFKit Removes Line Breaks in Annotations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: PDFKit Removes Line Breaks in Annotations
      • From: Stewart Milberger <email@hidden>
  • Prev by Date: break on @throw (was Re: CoreDate: Can't reassign an object to a different store once it has been saved.)
  • Next by Date: [Moderator] EOT Re: Why do people in the UK put a u in the word color?
  • Previous by thread: Re: Why do people in the UK put a u in the word color?
  • Next by thread: Re: PDFKit Removes Line Breaks in Annotations
  • Index(es):
    • Date
    • Thread