How to show a PDF in iOS

According to online docs:

FolderItem.Open (activate As [Boolean]= True)

New in 2019r2.1

Supported for all project types and targets.

Doesn’t work in iOS
How do you create a PDF and open it using something else?
If I try to SHARE the file using it’s URLPath, and the user tries to Markup, the whole system becomes unresponsive.
So I want to hand off the display to another app

Is this miraculous timing ? Roadnap #2

No.
Awful timing really.
I don’t need Xojo to allow me to create PDFs -this roadmap item is no use to me.
I have spent a lot of money on MBS plugins to do that, and thankfully that part is working fine.

I want to have the PDF displayed once it is created.
The docs say Folderitem.open is available on all platforms
It isn’t available in iOS

ShowURL doesnt work.
I thought MBS might solve it with LaunchServicesMBS but that doesn’t launch the PDF either.

So I’m still looking for a way to display a PDF I created.

(I don’t want to display it in an HTMLViewer which is part of my app.
I want the user to be able to display it, print it, share it, copy it to iCloud.
None of those are possible in an HTMLViewer)

1 Like

Use a MobileSharingPanel to show a PDF on iOS.

SharingPanel1.ShareURL(pdfFolderItem.URLPath)

1 Like

You can show a PDF on iOS with PDFKit, DynaPDF or CoreGraphics functions in MBS Xojo Plugins or via declares.

Or even Picture.Open or Picture.FromData may work if Xojo did implement that with a PDF friendly API.

Use a MobileSharingPanel to show a PDF on iOS.

SharingPanel1.ShareURL(pdfFolderItem.URLPath)

This completely hangs my iPad if the user chooses ‘Markup’ from the options.
Works fine in simulator, hangs a device.
I cant ship like that and have no idea how to avoid it

You can show a PDF on iOS with [PDFKit]

I can render a PDF to a picture using plugins.

What I am trying to do is to get ‘a.n.other’ app to handle the PDF.
Adobe / Preview / GoodReader …

Implement MobileSharingPanel.ShareFile: feedback://showreport?report_id=62758

Steps: For now we can share Picture, Text and URL. Would be also helpful and important to add a new ShareFile Method to MobileSharingPanel to share a FolderItem.

Sharing a file already ‘works’… thats how I get the sharing panel up for other kinds of files:

myview.Share.Shareurl(specialfolder.documents.child(filename).URLPath,theoptions, cell.Control)

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.