Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Append an exported pdf

Featured Replies

I am building a report via the Save Records as PDF from various layouts, appending as I go. Along the way I need to export a PDF from a container field and append this exported PDF to the report being created via the Save Records as PDF.

I can't seem to figure out how to get the various "exported" PDF's appended to the report I am building it. Perhaps I've missed the answer in the forum?

The end goal is to have a single report with all the "exported" PDF's in their proper place within the main document.

FileMaker has no facility to append exported PDFs (from a container field) to an existing PDF that is created with "Save records as PDF".

You can however achieve this by making FileMaker call an AppleScript, which calls a Shell script, which calls a Python script!

It's not as horrific as it sounds.

The python script is already on your mac and is described here:

http://kpwu.wordpress.com/2007/02/02/joinsplit-pdf-file-easily-at-mac/

Get yourself familiar with how it works, and experiment with it manually in the Terminal.

Once you have tested it, you need just a few lines of FileMaker script:

set variable $pdfsToCombine to "saved1.pdf exported.pdf saved2.pdf"

set variable $outputName to "finished.pdf"

set variable $shellCommand to "/System/Library/Automator/Combine PDF pages.action/Contents/Resources/join.py -o " & $outputName & " " & $pdfsToCombine

perform Applescript "do shell script "" & $shellCommand & """

That should do it. You may need to play around with pathnames and syntax but the principle is there. Hope that helps.

James

  • Author

Thank you, I'll try it right now. Although I develop on a Mac, my users are all PC. Is there an equivalent to "Python Script" native on a PC?

I don't know much about Python or how portable it is to the Windows environment.

However a forthcoming project of ours requires exactly this.

My research so far has led me to this:

http://www.accesspdf.com/pdftk/

which looks promising as a starting point for command-line-based Windows PDF combining.

J

FileMaker WILL allow PDF appending, but you need to get version 9 or higher.

Yes, you can append to existing PDF when doing 'save records as PDF', but you cannot append the pages from a PDF file being exported from a container field.

It could only be done completely by FileMaker if:

- you have only one PDF being exported from a container field

- that PDF is to come BEFORE all the pages to be generated via 'save records as PDF'

Because you could then:

- export field contents ( PDFcontainer ; file:output.pdf )

- perform find (restore)

- go to layout (whatever)

- sort (however)

- save records as PDF (file:output.pdf ; append)

- perform find (restore)

- go to layout (whatever)

- sort (however)

- save records as PDF (file:output.pdf ; append)

- perform find (restore)

- go to layout (whatever)

- sort (however)

- save records as PDF (file:output.pdf ; append)

If you have more than one PDF in a container, or you don't want it at the beginning, then you need Python or similar.

James

If the exported document goes in the middle of the finished "book" then you need three PDFs:

1) a PDF (built using Save Records as PDF, appending as necessary) containing all the pages that should come BEFORE the exported PDF

2) the exported PDF

3) a PDF similar to file 1, but containing all the pages that should come AFTER the exported PDF

You then use join.py or a Windows equivalent to join them together.

James

James said:My research so far has led me to this:

http://www.accesspdf.com/pdftk/

which looks promising as a starting point for command-line-based Windows PDF combining.

Lastest version, Nov. 28, 2006!

Yes, I noticed that too! But if it was a good product in 2006 it *might* still work reliably now, all the more so as it is a command-line thing.

After all, my copy of FileMaker 6 is still going strong ;-)

J

  • 4 weeks later...

Fermi,

Did you get this to work on Windows with the following?

»http://www.accesspdf.com/pdftk/«

I am trying to do the same thing. I have 2 PDFs and want to append into one on the fly.

The first is a PDF generated from FM. The second is a standard, static document I'm gettting from the Windows file system.

The downside is that you have to install the pdft.exe file so everyone can access it. Yet another layer to maintain.

Thank you.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.