Post

Replies

Boosts

Views

Activity

Reply to CGPDFOperatorTableSetCallback fails with `ID' isn't an operator.
Hi Randy, seems you are working with CoreGraphics PDF lib. As iOS 18.x still has a PDFKit bug (see here: https://developer.apple.com/forums/thread/762788 ) I have been looking into CG myself. Getting text with a CG Scanner out of a PDF is quite doable, but getting the bounding boxes of those texts is quite a challenge. Since you seem to have experience with Core Graphics PDF routines, can you steer me to same sample code for getting bounding boxes of characters/words/text blocks out of a PDF page with Core Graphics? Thanks for any help! Regards, Klaus.
Topic: Graphics & Games SubTopic: General Tags:
Jan ’25
Reply to PDFKit PDFPage.characterBounds(at:) returns incorrect coordinates iOS 18 beta 4
iOS 18.4 beta 1 and 2 do not fix the issues. Selection.bounds(at: page) delivers more correct results than page.characterBounds(at: index). But not as good as characterBounds(at) for iOS 17 and earlier. // page: PDFPage for (index, character) in page.enumerated() { if character == "\n" || character == "\r" { continue } let range = NSRange(location: index, length: 1) guard let selection = page.selection(for: range) else { continue } let charBounds = selection.bounds(for: page) } Do we still have a chance for a PDFKit bug fix from Apple? Does Apple really think that PDFs are dead and it's not worth keeping its PDF libraries up to date? What about the billions of PDF documents out there and the millions more generated every day? If you need character and word accurate text extraction with precise layout data, LLMs are still no substitute.
Topic: App & System Services SubTopic: General Tags:
Mar ’25
Reply to PDFKit PDFPage.characterBounds(at:) returns incorrect coordinates iOS 18 beta 4
iOS 18.3 does not fix this bug, either! Apple, please!!, fix this bug for iOS 18.4.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Exact Extract of Text from PDF
Is this iOS 18 only, or does it happen on iOS 17.x and earlier, too?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to CGPDFOperatorTableSetCallback fails with `ID' isn't an operator.
Hi Randy, seems you are working with CoreGraphics PDF lib. As iOS 18.x still has a PDFKit bug (see here: https://developer.apple.com/forums/thread/762788 ) I have been looking into CG myself. Getting text with a CG Scanner out of a PDF is quite doable, but getting the bounding boxes of those texts is quite a challenge. Since you seem to have experience with Core Graphics PDF routines, can you steer me to same sample code for getting bounding boxes of characters/words/text blocks out of a PDF page with Core Graphics? Thanks for any help! Regards, Klaus.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to PDFKit PDFPage.characterBounds(at:) returns incorrect coordinates iOS 18 beta 4
iOS 18.4 beta 1 and 2 do not fix the issues. Selection.bounds(at: page) delivers more correct results than page.characterBounds(at: index). But not as good as characterBounds(at) for iOS 17 and earlier. // page: PDFPage for (index, character) in page.enumerated() { if character == "\n" || character == "\r" { continue } let range = NSRange(location: index, length: 1) guard let selection = page.selection(for: range) else { continue } let charBounds = selection.bounds(for: page) } Do we still have a chance for a PDFKit bug fix from Apple? Does Apple really think that PDFs are dead and it's not worth keeping its PDF libraries up to date? What about the billions of PDF documents out there and the millions more generated every day? If you need character and word accurate text extraction with precise layout data, LLMs are still no substitute.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to PDFKit PDFPage.characterBounds(at:) returns incorrect coordinates iOS 18 beta 4
iOS 18.4 beta 4 does not fix the issue.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’25
Reply to PDFKit PDFPage.characterBounds(at:) returns incorrect coordinates iOS 18 beta 4
iOS 18.5 still has the same issue.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to PDFKit PDFPage.characterBounds(at:) returns incorrect coordinates iOS 18 beta 4
Any news from Apple on the issue?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’25
Reply to iOS 26 AttributedString TextEditor bold and italic
You can disable the visibility of the Format panel with .textInputFormattingControlVisibility(.hidden, for: .all)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25