Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
PDFKit.Print
Prints a PDF without dialogs.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
PDFKit | 4.0 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from PDFKit.Open. |
Result
Returns OK or error.
Description
Prints a PDF without dialogs.Optionally if you have a fax printer, you can also pass fax number to send a fax.
Please use PDFKit.ResetPrintSettings and then call PDFKit.SetPrintSetting for all the settings you need.
Please use DynaPDF.Print for Windows.
Printing may fail on Server if no printer selected or printer is not turned on.
Added printing for iOS to the plugin in v14.2. You can print either with dialog or without dialog.
You can print PDF documents here, image containers or file paths to image and PDF files.
Examples
Print a PDF container:
MBS( "PDFKit.Print"; MyTable::MyDocumentContainer )
Fax a PDF container:
MBS( "PDFKit.ResetPrintSettings" )
MBS( "PDFKit.SetPrintSetting"; "FaxNumber"; "+123456" )
MBS( "PDFKit.Print"; MyTable::MyDocumentContainer )
Print page 2 to 10 and make 3 copies:
MBS( "PDFKit.ResetPrintSettings" )
MBS( "PDFKit.SetPrintSetting"; "FirstPage"; 2 )
MBS( "PDFKit.SetPrintSetting"; "LastPage"; 10 )
MBS( "PDFKit.SetPrintSetting"; "Copies"; 3 )
MBS( "PDFKit.Print" )
Print with options:
# print pdf
Set Variable [$print3; Value:MBS( "PDFKit.ResetPrintSettings" )]
Set Variable [$print4; Value:MBS( "PDFKit.SetPrintSetting"; "Printer"; "Cliques Xerox" )]
Set Variable [$print5; Value:MBS( "PDFKit.SetPrintSetting"; "FirstPage"; PDF::PrintPageFrom )]
Set Variable [$print6; Value:MBS( "PDFKit.SetPrintSetting"; "LastPage"; PDF::PrintPageTo )]
Set Variable [$print7; Value:MBS( "PDFKit.SetPrintSetting"; "Copies"; 1 )]
Set Variable [$print8; Value:MBS( "PDFKit.SetPrintSetting"; "scalingMode"; "DownToFit" )]
Set Variable [$print8; Value:MBS( "PDFKit.SetPrintSetting"; "DuplexMode"; "DuplexNoTumble" )]
Set Variable [$print9; Value:MBS( "PDFKit.Print"; PDF::Annotated PDF )]
Print what is in the container:
// prints PDF and Images on iOS
Set Variable [ $r ; Value: MBS("PDFKit.Print"; PDFKit Print::FileContainer) ]
If [ MBS("IsError") ]
Set Field [ PDFKit Print::Result PDFKit Print::Result ; $r $r ]
Show Custom Dialog [ "Failed to print file" ; $r ]
Else
Set Field [ PDFKit Print::Result PDFKit Print::Result ; $r $r ]
End If
Print on iOS without dialog:
Set Variable [ $r ; Value: MBS( "PDFKit.SetPrintSetting"; "ShowsPrintPanel"; 0 ) ]
Set Variable [ $r ; Value: MBS( "PDFKit.SetPrintSetting"; "PrinterURL"; "ipp://Laserdrucker.local.:631/ipp/print" ) ]
Set Variable [ $r ; Value: MBS( "PDFKit.SetPrintSetting"; "OutputType"; "Grayscale" ) ]
Set Variable [ $r ; Value: MBS( "PDFKit.SetPrintSetting"; "JobTitle"; "Test" ) ]
Set Variable [ $r ; Value: MBS( "PDFKit.SetPrintSetting"; "DuplexMode"; "LongEdge" ) ]
Set Variable [ $r ; Value: MBS("PDFKit.Print"; PDFKit Print::FileContainer) ]
If [ MBS("IsError") ]
Set Field [ PDFKit Print::Result PDFKit Print::Result ; $r $r ]
Show Custom Dialog [ "Failed to open file" ; $r ]
Else
Set Field [ PDFKit Print::Result PDFKit Print::Result ; $r $r ]
End If
See also
- DynaPDF.Print
- ErrorLog
- IsError
- PDFKit.GetPrintSetting
- PDFKit.List
- PDFKit.Open
- PDFKit.ResetPrintSettings
- PDFKit.SetPrintSetting
- Printer.Print
Release notes
- Version 14.2
- Implemented PDFKit.Print and related functions for iOS.
- Version 8.5
- Changed PDFKit.Print to automatically disable print dialogs when printing on FileMaker Server.
Example Databases
- Mac and iOS/PDFKit/Extract PDF Pages
- Mac and iOS/PDFKit/PDFKit Print Documents
- Mac and iOS/PDFKit/PDFKit Print
- Mac and iOS/PDFKit/Print PDF
- Mac and iOS/PDFKit/Printing iOS
Blog Entries
- MBS Plugin 14.2 for Claris FileMaker
- MBS @ FMTraining.TV - Printing in FileMaker with the MonkeyBread Plug-in
- Controlled printing for iOS in FileMaker
- MBS FileMaker Plugin, version 14.2pr1
- Top 10 from the MBS Plugin in 2022
- MBS FileMaker Plugin 12.3
- New error log functions for FileMaker
- Combine MBS functions to automate processes in FileMaker
- PDF Printing in FileMaker on Windows without PDF Reader
- MBS FileMaker Plugin 4.0 for OS X/Windows - More than 2200 Functions In One Plugin
This function checks for a license.
Created 18th August 2014, last changed 7th April 2024