iOS PDFViewer Question

Very excited to see there are now some native options available to display PDFs in iOS apps.

I have a question about the new PDF viewer to the devs. I want to convert a PDF to a Xojo Picture somehow - is this possible with this new control? I want to be able to annotate PDFs in an iOS app idea I’m messing about with and it strikes me that the easiest way to do that would be to get a Picture version of the PDF and draw it onto a Canvas.

Hi @GarryPettet

Not currently; but, please, add a Feature Request to make it to happen… :slight_smile:

(would work adding these annotations directly to the viewed PDF itself?)

Can do Javier.

What I want to do is use the Apple Pencil to draw over a PDF of a musical score. Is this something that could be implemented myself within the viewer?

Not now. Please, add the Feature Request… and we will see… :wink:

This can be done already with QLPreviewControllerMBS and the markup code there to annotate PDF documents.

Looking at the example app you provide - that uses the default markup tools to draw over the PDF. I need to create my own UI and tools for drawing.

Can your PDF classes somehow export the PDF to a Picture or image of some sort?

Our PDFPageMBS class can render a page to a picture.

and that’s iOS compatible too?

Yes, of course.

Since 23.3 version

1 Like

Feedback request:

https://tracker.xojo.com/xojoinc/xojo/-/issues/73581

1 Like

@GarryPettet

Until this is implemented in MobilePDFViewer, maybe you can find of interest this blog post: How to: Create Thumbnails from PDFs on iOS – Xojo Programming Blog :wink:

1 Like

That is fantastic - thank you!