What is your FMP version and OS version. It sounds like a Mac, which is not a problem. I would need more details on what you do to be successful.
When i build the database it just worked, after i ran it from a server it didn't.
The most common cause for this error message is the one the error message does not list: An invalid file path. It will be helpful if you post the file path that you used.
I totally forgot to mention: I'm on a Mac whit Mountain Lion. The server is also Mountain Lion. I'm using Filemaker 12 Advanced. I just select the "Save record as PDF" scriptstep. But also if i select the Save record from the menu it gives me the error.
The filepath is as followed:
But as previously mentioned, sometimes it will export. And when i select a folder manually for example the Desktop via the menu, it also gives me the error.
Tom, I still not sure what you are trying to do. I think your are creating a Layout that is an invoice, then saving that invoice record Layout as a PDF file in a external referenced folder. The file path will change relative to the server DB and will be different than the Client's.
Do you have Container's in your layout?
Does everyone have FMP permisson, not Mac permission, to print when using the Server DB version? In essense FMP is "Printing" to a PDF file.
After you successfully Save the invoice record in PDF format, what do you intend to do with that file?
PS: Remember if you sign into the server to change or test the Server DB file, you must "Open Remote" with full FMP permissions.
Hmmm, since Tom gets an error even when saving to the desktop, I'd be concerned that user account permissions on the client computer may have a problem. But even the tinyiest detail wrong in your file path for the current user, can trip this error.
I recommend using a variable to compute a 'safe path' for testing purposes such as:
Set variable [$Path ; "file:" & get ( DesktopPath ) & "YourFilenameHere.PDF"]
Then type $Path (no quotes) in where you are currently specifying the file path for your exported PDF file.
If that still trips an error the problem is external to FileMaker, check your user account permissions.
If it works, you'll need to debug your filepath to get it to work.
Hi Phil and Jim,
Sorry for the late response, i'm only on location on wensday.
I 'print' to PDF. I checked my permissions and i got full permission. When an project is done it prints an invoice and it exports the invoice to the projectfolder. Printing works fine, only the 'print'/export to PDF won't work. I don't have containers on the invoice layout.
I changed the filepath to the variable but still get the folowwing error:
“YourFilenameHere.PDF” could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.
It's driving me crazy! Especially because i used to work. I get this error on all the macs (7). And sometimes a PDF will be created and will be exported to the right folder.
Any thought left?
I suggest posting the exact script that you are using. So far we only have seen bits and pieces of it and the crucial detail may be in the parts of the script that we have not yet seen.
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 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.
- 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.
This is one of the scripts i use wich wil give me the error
I can see possible issues to check.
- You have a go to related records step, but there is no code to check to see if any related records actually exist. Perhaps that never can happen, but if there are no related records, no error message interrupts your script and the script does not take you to the "pakbon afdrukken" layout, leaving you on the original layout.
- Your set variable expression refers to Orders::FolderName and also to Orders::Ordernummer, but your Go to Related records step (assuming there were related records present), has changed "context" to a layout based on Ordergegevens | Orders. That may not be a problem, but since I don't know the relationships involved, I am pointing it out as the relationshp between Ordergegevens | Orders and Orders will now determine what values are used in this calculation and it is possible (depends on the relationship) that the values may now come from a different record.
If you have FileMaker Advanced, you might enable the script debugger and data viewer and watch to see what value appears in $filepath just before the save as pdf step to check for any possible problems in that path.
If you do not have advanced, you may want to put a show custom dialog with this variable in the custom dialog just before the Save As PDF step as a way to check the value of the variable.
Here is addtional thoughts.....
1) Perhaps you have an "true error". You file size may be too big for the disk. On Save Records as PDF script step, change option to Save Current Record and NOT "records being browsed". Depending on your "Found Set" record count, that PDF file could be hundreds of pages long!
2) You shouldn't need the Perform Applescript step to mount a volume [Opslag], the volume [Opslag] should be mounted to have the Filepath work. If you don't see the [Opslag] volume image on your MacOS desktop on the Server, you have a volume problem.
Try using your FMP advanced trace to see what part of the Script is causing the error. If you don't know how to do that, i like a quick check useing the Speak script step on a Mac at key points in your script to see if you are getting the error from Applescrip or Save as PDF.
I deleted my previous post because i found out something important minutes after i posted here on the forum.
In the system there are several buttons, for printing different things. Most of the times the user prints a sticker on a labelwriter, and a invoice on a normal printer. The script i posted is for printing and saving the invoice. If the user prints a sticker first and then a invoice, you'll get the exporterror. If i try to print a invoice again after the error, it worked! The PDF would save without error.
That made me change the order of the scriptsteps, first i printed the invoice and than i exported the PDF. With succes! Even after hitting the print a sticker button first! So i finally figured it out: When I change the the page-setup for the stickers, i first have to change it back to A4 (Which i did when i wanted to print the invoice), if i do that the error is gone! That's why sometimes it would work and sometimes it wouldn't!
Thanks for the help and efforts!
I hope you have this fixed by now, but for the benefit of others here's a different solution I found.A script that had worked prior to upgrading to FM13 started giving intermittent errors saving a PDF on a client's iMac. It was giving the usual "File.pdf could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk."
The script still worked on my Mac. Client's Mac would almost never save. The drive was not full. Permissions were ok. It wouldn't always save a PDF directly to the desktop either.The problem appears to have been related to Acrobat Reader. I deleted that application and reinstalled a fresh copy. The saving PDF problem went away immediately after a restart.