Jump to content

Replace rather than Append


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

Recommended Posts

Hi,

 

I only found one post, but not very helpful.  I'm exporting my pdfs to the temporary folder.

 

Everything is great except when I export again.

 

Since I'm using the same NAME the append just adds to the existing .pdf within the temporary folder - Yikes!!!

 

I was hoping once the script was finished that was it, but after remembering where the Temp Folder is ... HOW can I REPLACE the pdf file I put there instead of append it.

 

All I can think of at this moment is either push the pdf into a container; since the pdf won't change that often.  Or, set a global fields to empty and each time the user runs that script they will create the same file pdf but with a .1, .2, .3 et cetera.

 

I was hoping for a better way.  I really like the Temporary Folder.  Is there a way to replace the existing .pdf file ??

 

Thank you.

 

Tom

Link to comment
Share on other sites

You can copy and paste a script. 

 

Select the script to be copy Menu Bar >> Scripts >> Manage Script Tasks >> Print Icon, Then select the option in the print dialog box, "Open PDF in Preview" and then select all Copy and then Paste it to a Reply here.

 

Lee

Link to comment
Share on other sites

Your script shows you always using  

 

[ Restore; Append; No dialog ]    

 

As Rick said: to start a fresh file; don't use append.

 

The following steps in the script can continue to use append.

Link to comment
Share on other sites

Append has some other pitfalls too. In printing out pay slips for two different groups of employees I would save "Slips.pdf" to the Temp folder. Since summaries were involved, a script would find the correct slip with the correct date and append each slip to the original PDF. Fine, right? But when I ran the same routine on a second group in the same session the script would print out both sets. Of course, since I hadn't quit FM, the file "Slips.pdf" was still in the Temp folder so the second group was appended to the first. After I figured it out the solution was simple. Each iteration of the script would save the file as Slips& a number generated by the random function &pdf. I forget the exact syntax.

Link to comment
Share on other sites

This topic is 4003 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.