Jump to content
Sign in to follow this  
David Jondreau

viewing pdfs in container fields - cross platform

Recommended Posts

Is there a way to insert a pdf into a container field that can be viewed directly in the field in a cross platform situation?

Viewing a file after using Insert Picture only seems to work on Macs. In fact, with Insert Picture, I can't even get pdfs to show up in the dialog box on Windows and have to insert file instead.

Insert File doesn't seem to allow the option to view the pdf on either platform.

Any thoughts?

Share this post


Link to post
Share on other sites

I'm kinda in the same boat. But we only have 2 macs here and are planning on phasing them out so I kinda gave up for now as I have to much going on.

So I used this script instead.

Set Error Capture[On]

If[is Empty(Inventory::PDF_Location)]

Show Custom Dialog["There is no PDF for this record. Would you like to add a referenced PDF?"]

If[Get (LastMessageChoice)=1

Exit Script[]

Else

Insert File[Reference;Inventory::PDF_Location]

End If

End If

If [Get SystemPlatform)=-2

Go to Field[select/Perform; Inventory::PDF_Location

Else

Show Custom Dialog["Buy a PC please"]

End If

It has something to do with capturing the filepath as they are different from mac to pc.

From a mac the path to the file looks like

filemac://Hd-htgl5e9/share/PDF LAND/Switches/TQ2_12v_Relay.pdf

From a pc

filewin://Hd-htgl5e9/share/PDF LAND/Switches/TQ2_12v_Relay.pdf

Might steer you in the right direction but I didn't get much further than that.

Share this post


Link to post
Share on other sites

If [Get SystemPlatform)=-2

Go to Field[select/Perform; Inventory::PDF_Location

Else

Show Custom Dialog["Buy a PC please"]

End If

Very nice.

From a mac the path to the file looks like

filemac://Hd-htgl5e9/share/PDF LAND/Switches/TQ2_12v_Relay.pdf

From a pc

filewin://Hd-htgl5e9/share/PDF LAND/Switches/TQ2_12v_Relay.pdf

I've simplified things by using Get(DesktopPath) (let them organize their own files), but I guess I can't display the pdf on a PC by using a Insert Picture.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.