Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 23 in printed book and digital formats -- plus a one-year subscription (beginning with 24.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are short, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 24.2 ('Xojo Sonar')
Instant purchase and download via GumRoad!

COLUMN

PDF Highlights

Setting highlights with PDFKit from the MBS Xojo plugins

Issue: 24.2 (March/April 2026)
Author: Stefanie Juchmes-Simonis
Author Bio: Stefanie studied computer science at the university in Bonn. She came in touch with Xojo due to the work of her brother-in-law and got a junior developer position in early 2019 at Monkeybread Software.
Article Description: No description available.
Article Length (in bytes): 14,977
Starting Page Number: 77
Article Number: 24208
Resource File(s):

Download Icon project24208.zip Updated: 2026-03-01 13:10:18

Related Link(s): None

Excerpt of article text...

Did you know that, in addition to DynaPDF, you can also do small PDF tasks on Mac OS using the PDFKit section of the MBS plugins?

I've brought one such task with me today. We want to be able to search within a PDF document and highlight the search results in color on the PDF. Today, we'll take a look at how this works.

In our window, we'll position various buttons and other elements for this purpose (see Figure 1).

The Load PDF button opens a dialog box where we can select the file for searching and marking. We specify that only PDF files can be selected in the dialog box. We can do this using the filter in the OpenFileDialog class.

The dialog is then displayed using the Xojo ShowModal method, and the selected file is stored in a window property named PDF_FolderItem of type FolderItem.

Next, we check whether a file has been selected. If this is not the case because the user has closed the dialog with Cancel, an error message is displayed in the label where normally the path of the document will be displayed. If the file has been loaded, we display the path of this file in the label.

...End of Excerpt. Please purchase the magazine to read the full article.