Usage of TMSFMXNativeUIDocumeInteractionController

Delphi Rio 10.3.3
Latest ICL Components

Am trying to view and have the option to Print a PDF from iOS on an iPad.  The documentation for the subject component states:

"Use this component to present an appropriate user interface for previewing, opening, copying, or printing a specified file."

So this would seem ideal but I am having a hard time trying top get this to work. Can someone please provide some example code on how to use this component.

I initially tried to achieve this by viewing the PDF in the WebBrowser component (standard Delphi - not iCL).  Works fine in Windows but only gave a view of the PDF on iOS with no options to print or anything else.  That's why I am now looking at the iCL component.

Thanks in advance for any help.

Bill Zwirs

Hi,


The demo is included in the distribution, under public ..\documents\tmssoftware\TMS iCL Demos.

I've just gone through all the iCL demos and unless I'm missing something - cant find any demo using this component.  Can you please help and let me know which demo is supposed to show me how to use this component.

Thanks

Bill Zwirs

Hi,


It's actually very simple:



  TMSFMXNativeUIDocumentInteractionController1.&File := ExtractFilePath(ParamStr(0)) + 'test.pdf';
  TMSFMXNativeUIDocumentInteractionController1.ShowPreview(True);


if you want to share the file instead you can use one of the following:



  TMSFMXNativeUIDocumentInteractionController1.ShowFromRect;
or 
  TMSFMXNativeUIDocumentInteractionController1.ShowOptionsFromRect;

Pieter,

Thanks.....that works.

regards

Bill Zwirs