I would suggest using the same path to import as you did to export. imagewin is not a prefix.
See the following link about making paths and about prefix.
Is the same layout current in both cases? Steps that start with the word "insert.." are particularly layout sensitive. The current layout must have the target field on it and the field must be accessible when in Browse mode. Insert PDF also requires that the layout's container field object be optimized for interactive content.
S Chamblee, for what it's worth, imagemac: and imagewin: and image: are all valid prefixes. In fact, it seems to me they're required for inserting PDFs; in the script step options window, the examples shown are all "image" prefixes rather than "file" prefixes, using the "file" prefixes results in an error on the Mac, and on Windows, nothing happens. At least when I use "imagemac," the operation succeeds as expected without any error on the Mac.
What exact steps/methods are you using to insert or import the PDF?
imagemac: and imagewin: are the tags for inserting an image file rather than a PDF such as when you use Insert Picture instead of Insert File or Insert PDF. On Mac systems, you can use insert picture to insert a PDF. You cannot use this menu option/script step to do so on windows. You have to use Insert File or Insert PDF.
If you are using a script, I suggest posting that exact script.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
The step I'm using is "Insert PDF."
Uploading screenshot of the script.
Uploading screenshot of the resulting $import_path variable and the error code - 3 - "Command is unavailable (for example, wrong operating system, wrong mode, etc.)"
The Bags::Label field is set for Interactive content and can be entered in Browse mode.
All right, you got me on the right path. "Insert PDF" just doesn't work on Windows, but "Insert File" does, and it works on Mac, too, and it works with the filemac: and filewin: prefixes. I don't get the pretty previews anymore, but I guess I care less about that than having it work at all.
Thanks for looking at it.
1 of 1 people found this helpful
Can you confirm that you are in Browse mode at the time that the Insert PDF step executes?
And is this script being run on a FileMaker Pro client of the database or have you published this to the web and this script is being run by a client using a Web Browser?