Wednesday, 15 January 2014

How to script printing of multiple layouts from filemaker pro plus multi page PDFs from containers in sequence -



How to script printing of multiple layouts from filemaker pro plus multi page PDFs from containers in sequence -

we need script print multipage pdf within printing sequence filemaker pro.

we utilize filemaker pro database rough around edges general works our processes. trying automate workflows go on run gaping glitches have stumped , held our productivity application.

it appears filemaker unable print multipage pdf's stored in it's container fields. farther complicating mater filemaker pro mac has frequent problem crashing on larger files when using adobe default web plugin view pdf files, thereby making necessary default using "preview" mac default reader.

the problem using preview though when documents created using acrobat such forms or pdfs embedded pics, preview fail recognize info on forms or embedded pics thereby rendering blank page, making necessary utilize acrobat print documents...

our solution requires batch print big amounts of documents found sets within our database.

each record has series of layouts must printed in specific order , collection of attachments (container fields) must printed.

currently able batch print filemaker layout documents in proper sequential order batch, (average 20 records per batch, each record having 10 pages = 200 pages (without corresponding attachments)

because of filemaker's limitations must manually go each record, open each relevant attachment, right click "open as" adobe pdf, execute print command, manually close adobe window, manually close filemaker container window , repeat each relevant attachment per record.... can imagine becomes time consuming.

to create matters more complicated have hand collate documents insert separately printed container pdf's , associate them other printed docs...

we trying create scripting enable print entire file in proper sequential order pre collated. (i.e. print 5 layouts, print container 1, print 3 layouts, print container 2, print 2 layouts, print containers 3 , 4) move next record repeat...

i believe 1 way solve export pdf container field watch folder have applescript attached , automatically print.. have been unsuccessful in figuring out how script hot folder print using adobe engine.

i have made hot folders print using default preview engine results in blank document. these documents seem print correctly when printed print dialog of adobe reader or acrobat alone.

i open suggestions @ point...

update: able create apple script culling bits other posts. script batchprints pdfs folder using acrobat pro 11 engine , moves them separate folder when complete... i'd assistance in integrating script filemaker when export pdf container field prints in sequence other documents filemaker record... here script:

property myfolder : "hd:users:user:desktop:print:" set myfiles list folder myfolder without invisibles repeat myfile in myfiles set mycurrentfile ((myfolder string) & (myfile string)) string batchprint(mycurrentfile) end repeat on batchprint(mycurrentfile) tell application "adobe acrobat pro" activate -- bring acrobat open alias mycurrentfile -- acrobat opens new file tell application "system events" tell process "acrobat" click menu item "print..." of menu 1 of menu bar item "file" of menu bar 1 click button "print" of window "print" tell application "system events" tell process "acrobat" click menu item "close" of menu 1 of menu bar item "file" of menu bar 1 end tell end tell end tell end tell end tell tell application "finder" -- move printed file out set x (("hd:users:user:desktop:printed pdfs") text) if alias x exists beep else create new folder @ desktop properties {name:"printed pdfs"} end if move alias mycurrentfile folder "printed pdfs" end tell end batchprint

i did recently, although wasn't complicated requirements, using applescript. didn't utilize watch folder however. steps following:

calculate location export appending filename get( temporarypath ). export container field contents filemaker path. save path global field in filemaker use embedded applescript access global field path use applescript open file in preview , print it

try forgetting hot folder thought bit , see if can create applescript print pdf in known location, work printing pdf path stored in filemaker global field. 1 time working above algorithm should work.

pdf printing adobe acrobat filemaker

No comments:

Post a Comment