This article originally appeared in TidBITS on 2017-10-03 at 5:44 p.m.
The permanent URL for this article is: http://tidbits.com/article/17532
Include images: Off

PDFKit Improves Somewhat in High Sierra

by Adam C. Engst

Last year, when macOS 10.12 Sierra shipped, one of the main pain points revolved around PDF handling. That occurred because Apple chose to rewrite the PDFKit framework, presumably for better compatibility with iOS, but in the process both removed features and introduced numerous bugs (see “Sierra PDF Problems Get Worse in 10.12.2 [1],” 2 January 2017, and “PDF Problems Continue in 10.12.4, but Primarily Affect Developers [2],” 3 April 2017).

So what’s the PDFKit situation in 10.13 High Sierra? I polled my PDF-savvy developer friends, and the response was mixed.

On the plus side, Jon Ashwell of Sonny Software [3], who writes the Bookends bibliography app, noted that Apple had fixed two crashing bugs he had encountered, one on opening certain PDFs and another when rendering. EagleFiler developer Michael Tsai of C-Command Software [4] said that he had noticed that Apple had eliminated a crashing bug related to contextual menus, along with a horizontal scrolling bug. And Christian Grunenberg of DEVONtechnologies [5], makers of DEVONthink, pointed out that some minor rendering glitches had also been fixed and concluded, “Overall, it’s a step forward for Sierra users.”

That’s not to say that everything is Riesling and roses, though. Both Jon Ashwell and Christian Grunenberg said that creating a highlight annotation now obscures the underlying text, and Grunenberg is trying to work around the problem in the next update to DEVONthink.

Grunenberg also pointed out that PDFKit used to provide a sidebar for viewing all the note annotations in a PDF, but that was removed in Sierra and hasn’t yet made a comeback in High Sierra.

Craig Landrum of Mindwrap [6], developer of the scan-to-PDF app Optix, discovered that panning a PDF no longer works properly in High Sierra. Previously, in Landrum’s app, you could zoom in on a page and then use a hand tool to pan around. Now, clicking in a zoomed page ignores the click-down point and immediately jumps to the top of the page.

Somewhat annoyingly, Apple has worked around many of these bugs in Preview rather than fixing them in the underlying PDFKit framework. That’s helpful for Preview users, of course, but real fixes would be better. This behavior forces independent developers to implement workarounds, disable features, or put up with user complaints while hoping that Apple fixes the bugs.

Preview isn’t perfect in High Sierra. Although I wasn’t able to reproduce these problems, some users have reported issues with note annotations being transparent [7]. Plus, clicking items in a PDF’s sidebar table of contents suffers from two problems. First, after you click the ToC entry, an entry higher up usually ends up selected. And second, Preview scrolls to center the selected heading vertically in the window, rather than near the top. The positioning behavior may be intentional, but it forces users to scroll sooner to see more text than they would have in the past.

[image link] [8]

My take is that those who rely on PDF support in independent apps are probably better off upgrading to High Sierra than remaining on Sierra, since Apple has fixed some bugs. If you have instead stuck with 10.11 El Capitan, you may wish to delay upgrading to High Sierra until you can verify that the apps you rely on for PDF-related features are fully functional in High Sierra.

[1]: http://tidbits.com/article/16966
[2]: http://tidbits.com/article/17152
[3]: http://www.sonnysoftware.com/
[4]: https://c-command.com/
[5]: http://www.devontechnologies.com/
[6]: https://www.mindwrap.com/
[7]: https://www.reddit.com/r/MacOS/comments/72zrio/preview_pdf_bug_in_os_1013/
[8]: http://tidbits.com/resources/2017-10/Preview-scrolling-bug.png