Not something that I've ever found a way to do in FileMaker natively. So, I wrote a plugin to do it.
Basically, it'll allow you to merge two PDF's and then print directly from within FileMaker. Feel free to ask FM to include this natively - I've asked countless number of times...
Roll your own with ScriptMaster and iText
because you are using Java then all the javax printing classes also become available.
So add a header at the front of an exported file, print it, and return the total number of pages printed.. easy. Well OK I might have ovestated that, but actually this is about 8 lines of code.
Thanks. Any possibility of adding a function to get the number of pages?
Not familiar with ScriptMaster and iText? Can you elaborate a bit?
I need this to work in a Windows Filemaker Runtime environment.
Page 5 of the documentation:
Parameters : none
Result : number of pages in the current opened PDF Document
Returns the number of pages that exist in the current PDF document.
As for working in a runtime, one of my customers got this working by copying the PDF libraries included with FileMaker into the runtime executable. I don't know the details however - just that he got it working.
Very nice. I'll take a closer look at this and make a feature request to FileMaker.
Thanks for all the suggestions. I ended up with a solution for Windows at least, which is my main concern. I'm using Bullzip PDF printer. It actually has some features I didn't realize. It can do Merge, watermarks, etc. While I can not print a PDF directly from Filemaker, what I'm able to do is to save an existing PDF to disk from a container, and then print a one page Filemaker report that get's merged to the previosly extracted PDF. This is done by directing the print out to the Bullzip PDF printer. Prior to printing, you create a text file with the parameters you want for printing, and then when the document is printed from Filemaker, the actions elected are carried out as defined. I've found a DOS based utility that will actually execute the Print from a DOS command. Unfortunately the utility is not inexpensive, so I'd still like to solve that part of the problem a less expensive way. For now, I can bring the modified PDF back into another temporary container field, and then tell the user to right click and print from the interactive container.
I did find some DOS commands to execute printing!
"C:\Program Files (x86)\Adobe\Reader 10.0\Reader\AcroRd32.exe" /t "C:\PDFOUT\TEST4.pdf" will open the specfied document in Reader with the print dialog for the default printer.
If you specify a command like this,you can specify the printer.:
AcroRd32.exe /t <file.pdf> <printer_name> <printer_driver> <printer_port>
"C:\Program Files (x86)\Adobe\Reader 11.0\Reader\AcroRd32.exe" /t "C:\Folder\File.pdf" "Brother MFC-7820N USB Printer" "Brother MFC-7820N USB Printer" "IP_192.168.10.110"
This is nice in that is seems to work, but you have to ask the user to get the Printer Name, Driver and Port, or find a way to extract that information another way.
It's like that old "if you give a mouse a crumb" story. lol.
It seems you need only <printer_name> and it can be get from Get(PrinterName).
OK, I'll give that a try.
For Mac you could use the PDFKit functions from MBS Plugin. There we have a print command to print a PDF from container with a couple of options.