Jump to content

viewing pdfs in container fields - cross platform


This topic is 6176 days old. Please don't post here. Open a new topic instead.

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?

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

This topic is 6176 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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