-
Re: PDFKit Annotations are broken
Germanotto Sep 21, 2016 1:00 AM (in response to Samuco)I believe this is a bug (zooming in and out makes the annotations re-appear for me).
This still happens in the Sierra official release. I suggest everyone who encounters this to submit a bug report at https://bugreport.apple.com
-
Re: PDFKit Annotations are broken
equivocates Sep 23, 2016 3:06 PM (in response to Samuco)Does anyone know why those PDFAnnotation types have been deprecated? And what we can use instead?
-
Re: PDFKit Annotations are broken
Aderstedt Sep 26, 2016 7:25 AM (in response to equivocates)I asked about this at WWDC and got the response that the deprecations was a mistake. I would have expected this to be fixed by now…
-
Re: PDFKit Annotations are broken
equivocates Sep 28, 2016 3:28 PM (in response to Aderstedt)The PDFannotations certianly are buggier on sierra. For example, PDFAnnotationFreeText.setFontColor does not set font color.
-
-
-
Re: PDFKit Annotations are broken
Aderstedt Sep 26, 2016 7:33 AM (in response to Samuco)I've submitted several bugs against PDFKit, which as I understand it has received a complete rewrite for 10.12. There are so many problems with it that I wish they'd roll back to the 10.11 version for now and aim for 10.13 instead:
- In some cases I get two copies of each annotation, slightly offset from each other. The two copies may have different font colors (?).
- Changes to string values to annotations don't update the view.
A common work-around for most issues is (for me anyway) to set the PDFView's document to nil, call -[PDFView display], then set it back and call -[PDFView setNeedsDisplay]. This does not help for all the bugs when a user interacts with a text annotation widget by clicking on it.
-
Re: PDFKit Annotations are broken
michaelallenkelso Oct 12, 2016 7:10 PM (in response to Samuco)Having the same problem and found this problem discussed on stackoverflow.
No luck with any of the following PDFKit methods:
previewView.layoutDocumentView() for pageIndex in 0...pdf.pageCount - 1 { let page = pdf.page(at: pageIndex)! previewView.annotationsChanged(on: page) }
or any of the following NSView methods:
previewView.needsDisplay = true previewView.needsLayout = true previewView.documentView?.needsDisplay = true previewView.updateLayer()
I've tried scrolling the
PDFView
with code too but it hasn't been a reliable way of sneaking a refresh, and in general shouldn't be the way to signal that annotations have been added anyway. -
Re: PDFKit Annotations are broken
kingrichardthethird Dec 12, 2016 3:27 AM (in response to Samuco)PDFKit in Sierra has been a nightmare. I've just spent a day reworking my code to use the new API (or lack of one!) only to find creating annotations just doesn't seem to work, and a commenter here says that the mass deprecation was a mistake? This is after I had to hack the **** out of things to even run at all on 10.12's initial release. It's enough to make you loose any faith in Apple - this rework of PDFKit (which worked just fine before hand) was clearly released far too early.
-
Re: PDFKit Annotations are broken
yellow8 Dec 12, 2016 3:56 AM (in response to kingrichardthethird)I agree, PDFKit has become a nightmare in 10.12.
In the other well-known bugs:
- PDFViewDocumentChanged notification is not posted
- PDFView.allowsDragging = true has no effect => not possible to drop a PDF on the view
... please Apple, do something about it.
-
-
Re: PDFKit Annotations are broken
Amitabh Aug 26, 2017 6:09 AM (in response to Samuco)Did this issue get resolved? Any update since the latest release of PDFKit beta 6?