FORGEBOX Enterprise 🚀 - Take your ColdFusion (CFML) Development to Modern Times! Learn More...

Print Helper

v1.5.3 Public

SCS Print Helper

Master Branch Build Status( Master Branch Download Status(

A Module to help send jobs to the scs-print-api

How to Install this module

From a terminal or CML interface

    box install print-helper --save

How to Configure your module

Your ModuleConfig.cfc. will have by default this initial fake settings. settings = {
'apiUrl' = ""

Step 1: Override default apiUrl to send jobs to your own URL (one time change)

Override default ModuleConfig.cfc with your own settings for where the scs-print-api lives. You can do this by Making sure you add 'print-helper' node to the moduleSettings object in the Coldbox.cfc (if not present add it inside of the configure() function )

   		moduleSettings = {
            'print-helper' = { 'apiUrl' : '[your Print API URL]' }

FYI only, behind the scenes Coldbox will interpret the new settings correctly in this manner (no need to insert this code) property name="print-helper-URL" inject="coldbox:setting: print-helper";

Step 2: Instanciate your Model from your newly installed Module

When you declare a module and you define a models folder then the framework automatically register all models in that folder for you using a namespace of @moduleName in this case @print-helper . In other words you will have to create a new property and inject the model of your choice. The pattern to inject its value is [Model]@[Module]

	property name='printHelper' inject='[email protected]';

Step 3: call the print() method and pass your data.

Once your property has been declared and injected with the model, you are ready to use it, here is and example of the minimum required parameters you need to pass:

    printHelper.print(printer = [printer], fullPath = [fullPathToFIle]);

Here are additional parameters with their default values (but are not required.)
required string printer,
required string fullPath,
numeric copies = 1, (Default is 1) string layout = "portrait", () ["landscape","portrait"] default is portrait) numeric scale = 100 (Default is 100)

Dependencies (0)

Dev Dependencies (2)


$ box install print-helper

  • {{ getFullDate("Feb 18 2021 06:02 PM GMT") }}
  • {{ getFullDate("Feb 18 2021 06:02 PM GMT") }}
  • 1,087
  • 0
  • 341