Mac or Win? This bit is important...
Try to import as a Picture...
Mixed enverioment. I can import as a PDF. That should work. But how can i convert the current imports.
you can write a script that loops through your records, exports field contents to a temp path, then imports that temp path as a picture.
Go To Record - First
Set Variable $path = "file:" & get(temporarypath) & filename & ".pdf"
Export Field Contents - table::containerfield - $path
Insert Picture - $file - into table::containerfield
go to record - next, exit after last
You might want to insert the picture into a new container field so you have the old field and files as a backup. (also, making a backup before doing this is most likely a good idea).
Lyndsay is correct though, this varies based on platform, as mac uses Preview as the default PDF reader. On Windows you should have adobe acrobat reader installed, updated to the current version, and set as the default system program for opening PDFs.
Import as PDF script step is not working. The File is not found then. (scriptstep inport File uses the same variable)
Pict is not working with multiple PAges, so that is no solution
How are you storing your container fields? Are they being stored as a reference (link) to the file? Or are you storing them embedded in your database (either in your database file, or with the filemaker server storage option)?
I didn't think you could make interactive previews on files that are stored as just a reference.
I store the files inside the database. No reference files.
When i do this with scriptstep import file, i can give a field and location of the file to import.
When i use the scriptstep import PDF, i don't have the option to select the destination field (FM needs to fix this !!!)
So i saw a solution the i first add the scriptstep gotofield. But then i get a Error 100 at the import PDF file scriptstep.
We are using FMP12.
The PDF file is first generated from FMP, then saved to a tempfolder. This tempfolder is a $variable. This variable is working in the scriptstep import file, but not in the scriptstep import PDF.
Go To Field is not an bug, it's in the documentation:
Error 100 is a file missing error for import. I imagine you are incorrectly setting your $variable for path.
Do you have a screenshot or can you post the calculation of this?
Since you're using cross-platform, I'd recommend that it be something like:
"file:" & get(temporarypath) & table::primarykey & "_export.pdf"
Make sure to read up on file path creation:
Also make sure to read up on Insert PDF:
It can not be run as a scheduled server script. The container must be on the layout. It must be set for interactive. And it must have the field access for browse mode checked to allow for entry.
Do you have FMP advanced to run script debugger and see where exactly this is going wrong?
I found that "insert picture" and "insert PDF" need "image:" instead of "file:" in path.
It is not written in "Creating file paths"... too bad.
It's noted in the dialog box when you enter the file path for either Insert PDF and Insert Picture.
Remember you can concatenate in the dialog box as well, IE image:$path