Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Usage of TMSFMXNativeUIDocumeInteractionController

 Post Reply Post Reply
Author
Bill Zwirs View Drop Down
New Member
New Member
Avatar

Joined: 13 Jan 2011
Posts: 22
Post Options Post Options   Quote Bill Zwirs Quote  Post ReplyReply Direct Link To This Post Topic: Usage of TMSFMXNativeUIDocumeInteractionController
    Posted: 13 Feb 2020 at 5:20am
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
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3715
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2020 at 8:39am
Hi,

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

Back to Top
Bill Zwirs View Drop Down
New Member
New Member
Avatar

Joined: 13 Jan 2011
Posts: 22
Post Options Post Options   Quote Bill Zwirs Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2020 at 8:58am
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
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3715
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 13 Feb 2020 at 9:08am
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;
Back to Top
Bill Zwirs View Drop Down
New Member
New Member
Avatar

Joined: 13 Jan 2011
Posts: 22
Post Options Post Options   Quote Bill Zwirs Quote  Post ReplyReply Direct Link To This Post Posted: 15 Feb 2020 at 4:03am
Pieter,

Thanks.....that works.

regards

Bill Zwirs
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down