The Save as pdf script step has an option to append the PDF to an existing file. You can either save as PDF from a layout with the cover page--useful if it includes data from your database and then use save as PDF with the append option to produce the rest of the report and append it to that first page or you can export a PDF of the cover page from a container field and then append the additional pages of your PDF to it.
Once you have saved the combined PDF, your script can insert that file into a container field. If you save to the temporary folder on the computer, the exported/saved PDF will not be retained and you won't have any "file clutter" left behind by this process.
Awesome, this is just what I was hoping for. thank you so much. I won't close this post just in case I have more questions about this. Is that how to proceed on this forum?
So I would create a script that would go like:
-save the cover page as a pdf into a folder on my comptuer
-go to the report layout and save into the first pdf
-save the pdf into container field back in the database
That's a rough outline. The key is to specify the file name and path in a variable and use the same variable for saving both the PDF's and then also for inserting the final copy into a container field.
save the pdf into the temporary folder, so files aren't left lying around for the user to find.
Thank you, I will try these suggestions. Just had to battle the snow on Friday.
Okay so I have created the combined pdf document and saved it to a folder on my desktop. Now I have created a container field to contain the pdf. So from what I have been reading on Containter fields is it possible to be able to insert the pdf into the container field then double click on it to open the pdf?
Phil I think you answered this post to say it could be saved into a temp folder then insert right back into a container field.
You can save to any folder you want. The temp folder is simply convenient as you won't leave a copy on your computer.
It's technically possible to open a file in a container field by double clicking it, you have to use both exactly the right storage options, exactly the right options when inserting the file and non interactive optimization on the layout. This could not be used with a file in the temporary folder as you would have to insert a reference to the file into the container field that refers to a file kept in a folder where all users can access the same folder.
It's simpler to use a script with export field content to export and open a copy of the file.
So...once I have saved my pdf the folder where I will keep them all....I need to create a script and attach it to a button. The script will:
Go to external folder
Select the pdf
insert it into container field (where it will live so users can click on that field and the pdf opens so they can see it)
Then a script for the opening of the pdf once it is in the container field.
Is this correct?
Why would it "go to external folder" when it should already be inserted into a container field immediately after using Save as PDF to create it?
And you can open a PDF in your computer's default application for PDF's or you can view a PDF inside an interactive container field. Are you sure that you want to open it and not just view it inside the container field?
Clicking on a container field does not open the file that it contains unless you have formatted the container field to be a button that runs a script to open it.
To open it, simplest option is to use export field contents.
I want to view it. So I save the cover page to pdf, then I append it with the report pages. Then it is still in the folder on my desktop. I guess I am missing a step. I will play with it somemore.
You can select the option to open the PDF as part of the "Save" if you want to view it or you can view it in the container field if it's optimized for interactive content and you use Insert PDF--there are a few details that have to be changed, but this is an option that can be used here.
I want to view it in a container field. I have set the option to interactive in the inspector. But I only see the pdf icon not the document. I have made the container field the same size as a letter……8.5 x 11.
Several changes have to be made before that works.
You have to use go to field or go to object to put the focus on the container field, then use Insert PDF to insert the file.
The path used also has to be slightly different. You have to use "image:" as the first part of the file path when you insert a PDF in this manner. So you may need to edit the Select File dialog to be something like: