Child pages
  • pdf_output

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
{hidden}
Wiki Markup
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE{hidden}
\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:padding=0px|width=80px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}byte[]{td}{td}[#combinePDFDocuments]\(array)
Combine muliple PDF docs into one.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#combineProtectedPDFDocuments]\(array, passwords)
Combine muliple protected PDF docs into one.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#convertPDFFormToPDFDocument]\(pdf_form, 


HTML Table
classservoy sSummary
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summary
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#combinePDFDocuments(array)
Combine muliple PDF docs into one.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#combineProtectedPDFDocuments(array, passwords)
Combine muliple protected PDF docs into one.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]
Table Cell (td)
#convertPDFFormToPDFDocument(pdf_form, name_value_array)

...


Convert

...

a

...

PDF

...

form

...

to

...

a

...

PDF

...

document.

...

Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]

...

Table Cell (td)
#convertProtectedPDFFormToPDFDocument(pdf_form,

...

pdf_password,

...

name_value_array)

...


Convert

...

a

...

protected

...

PDF

...

form

...

to

...

a

...

PDF

...

document.

...

Table Body (tbody)
Table Row (tr)
Table Cell (td)
byte[]

...

Table Cell (td)
#endMetaPrintJob()

...


Ends

...

a

...

previously

...

started

...

meta

...

print

...

job.

...

Table Body (tbody)
Table Row (tr)
Table Cell (td)

Table Cell (td)
#getPDFPrinter([filename])
Returns a PDF printer that can be used in print calls.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getPagesPrinted()
Returns the number of pages printed by the last print call done in the context of a meta print job.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#getTotalPagesPrinted()
Returns the total number of pages printed in the context of a meta print job.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#insertFontDirectory()
Add a directory that should be searched for fonts.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Boolean
Table Cell (td)
#startMetaPrintJob()
Used for printing multiple things into the same PDF document.

HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idcombinePDFDocuments
classnode
Table Row (tr)
idname
Table Cell (td)
combinePDFDocuments
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
combinePDFDocuments
Span
stylefloat: left;
idiets
(array)
Table Row (tr)
iddes
Table Cell (td)
Combine muliple PDF docs into one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
array
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//combine muliple pdf docs into one.
pdf_blob_column = combinePDFDocuments(new Array(pdf_blob1,pdf_blob2,pdf_blob3));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=combineProtectedPDFDocuments|class=node}{tr:id=name}{td}h6.combineProtectedPDFDocuments{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}combineProtectedPDFDocuments{span}{span:id=iets|style=float: left;}\(array, passwords){span}{td}{tr}{tr:id=des}{td}Combine muliple protected PDF docs into one.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\array passwords {td}{tr}{tr:id=ret}{td}*Returns*\\byte[]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} //combine muliple protected pdf
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcombineProtectedPDFDocuments
classnode
Table Row (tr)
idname
Table Cell (td)
combineProtectedPDFDocuments
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
combineProtectedPDFDocuments
Span
stylefloat: left;
idiets
(array, passwords)
Table Row (tr)
iddes
Table Cell (td)
Combine muliple protected PDF docs into one.
Table Row (tr)
idprs
Table Cell (td)
Parameters
array
passwords
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//combine muliple protected pdf docs into one.
pdf_blob_column = combineProtectedPDFDocuments(new Array(pdf_blob1,pdf_blob2,pdf_blob3), new Array(pdf_blob1_pass,pdf_blob2_pass,pdf_blob3_pass));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertPDFFormToPDFDocument|class=node}{tr:id=name}{td}h6.convertPDFFormToPDFDocument{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}convertPDFFormToPDFDocument{span}{span:id=iets|style=float: left;}\(pdf_form, name_value_array){span}{td}{tr}{tr:id=des}{td}Convert a PDF form to a PDF document.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\pdf_form name_value_array {td}{tr}{tr:id=ret}{td}*Returns*\\byte[]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} var pdfform = plugins.file.readFile('c:/temp/1040a-form.pdf')
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idconvertPDFFormToPDFDocument
classnode
Table Row (tr)
idname
Table Cell (td)
convertPDFFormToPDFDocument
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
convertPDFFormToPDFDocument
Span
stylefloat: left;
idiets
(pdf_form, name_value_array)
Table Row (tr)
iddes
Table Cell (td)
Convert a PDF form to a PDF document.
Table Row (tr)
idprs
Table Cell (td)
Parameters
pdf_form
name_value_array
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var pdfform = plugins.file.readFile('c:/temp/1040a-form.pdf');
//var field_values = plugins.file.readFile('c:/temp/1040a-data.fdf');//read adobe fdf values or
var field_values = new Array()//construct field values
field_values[0] = 'f1-1=John C.J.'
field_values[1] = 'f1-2=Longlasting'
var result_pdf_doc = plugins.pdf_output.convertPDFFormToPDFDocument(pdfform, field_values)
if (result_pdf_doc != null)
{
	plugins.file.writeFile('c:/temp/1040a-flatten.pdf', result_pdf_doc)
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertProtectedPDFFormToPDFDocument|class=node}{tr:id=name}{td}h6.convertProtectedPDFFormToPDFDocument{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}convertProtectedPDFFormToPDFDocument{span}{span:id=iets|style=float: left;}\(pdf_form, pdf_password, name_value_array){span}{td}{tr}{tr:id=des}{td}Convert a protected PDF form to a PDF document.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\pdf_form pdf_password name_value_array {td}{tr}{tr:id=ret}{td}*Returns*\\byte[]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} var pdfform = plugins.file.readFile('c:/temp
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idconvertProtectedPDFFormToPDFDocument
classnode
Table Row (tr)
idname
Table Cell (td)
convertProtectedPDFFormToPDFDocument
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
convertProtectedPDFFormToPDFDocument
Span
stylefloat: left;
idiets
(pdf_form, pdf_password, name_value_array)
Table Row (tr)
iddes
Table Cell (td)
Convert a protected PDF form to a PDF document.
Table Row (tr)
idprs
Table Cell (td)
Parameters
pdf_form
pdf_password
name_value_array
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

var pdfform = plugins.file.readFile('c:/temp/1040a-form.pdf');
//var field_values = plugins.file.readFile('c:/temp/1040a-data.fdf');//read adobe fdf values or
var field_values = new Array()//construct field values
field_values[0] = 'f1-1=John C.J.'
field_values[1] = 'f1-2=Longlasting'
var result_pdf_doc = plugins.pdf_output.convertProtectedPDFFormToPDFDocument(pdfform, 'pdf_password', field_values)
if (result_pdf_doc != null)
{
	plugins.file.writeFile('c:/temp/1040a-flatten.pdf', result_pdf_doc)
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=endMetaPrintJob|class=node}{tr:id=name}{td}h6.endMetaPrintJob{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}endMetaPrintJob{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Ends a previously started meta print job. For meta print jobs that were stored in memory, not in a file on disk, also returns the content of the generated PDF document.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\byte[]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} //to print multiple forms to one pdf document (on file system). var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf') if (success) { forms.form_one
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idendMetaPrintJob
classnode
Table Row (tr)
idname
Table Cell (td)
endMetaPrintJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
byte[]
Span
stylefloat: left; font-weight: bold;
idiets
endMetaPrintJob
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Ends a previously started meta print job. For meta print jobs that were stored in memory, not in a file on disk, also returns the content of the generated PDF document.
Table Row (tr)
idret
Table Cell (td)
Returns
byte[]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//to print multiple forms to one pdf document (on file system).
var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf')
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form 
one
two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter()); application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.'); } application.output('total printed
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
plugins.pdf_output.endMetaPrintJob()

//to print multiple forms to one pdf document (to store in dataprovider).
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPDFPrinter|class=node}{tr:id=name}{td}h6.getPDFPrinter{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}{span}{span:id=iets|style=float: left; font-weight: bold;}getPDFPrinter{span}{span:id=iets|style=float: left;}\(\[filename\]){span}{td}{tr}{tr:id=des}{td}Returns a PDF printer that can be used in print calls. If a file name is provided, then a PDF printer that generates a PDF into the specified file is returned. If no argument is provided, then the PDF printer corresponding to the last started meta print job is returned.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\\[filename\] {td}{tr}{tr:id=ret}{td}*Returns*\\{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} //to
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetPDFPrinter
classnode
Table Row (tr)
idname
Table Cell (td)
getPDFPrinter
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;

Span
stylefloat: left; font-weight: bold;
idiets
getPDFPrinter
Span
stylefloat: left;
idiets
([filename])
Table Row (tr)
iddes
Table Cell (td)
Returns a PDF printer that can be used in print calls. If a file name is provided, then a PDF printer that generates a PDF into the specified file is returned. If no argument is provided, then the PDF printer corresponding to the last started meta print job is returned.
Table Row (tr)
idprs
Table Cell (td)
Parameters
[filename]
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//to print current record without printdialog to pdf file in temp dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPagesPrinted|class=node}{tr:id=name}{td}h6.getPagesPrinted{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getPagesPrinted{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the number of pages printed by the last print call done in the context of a meta print job.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} //to print multiple forms to one pdf document (on file system). var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf') if (success) { forms.form_one
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetPagesPrinted
classnode
Table Row (tr)
idname
Table Cell (td)
getPagesPrinted
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getPagesPrinted
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the number of pages printed by the last print call done in the context of a meta print job.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//to print multiple forms to one pdf document (on file system).
var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf')
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form 
one
two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter()); application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.'); } application.output('total printed pages
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
plugins.pdf_output.endMetaPrintJob()

//to print multiple forms to one pdf document (to store in dataprovider).
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getTotalPagesPrinted|class=node}{tr:id=name}{td}h6.getTotalPagesPrinted{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}getTotalPagesPrinted{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Returns the total number of pages printed in the context of a meta print job. Call this method before ending the meta print job.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} //to print multiple forms to one pdf document (on file system). var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf') if (success) { forms.form_one
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idgetTotalPagesPrinted
classnode
Table Row (tr)
idname
Table Cell (td)
getTotalPagesPrinted
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
getTotalPagesPrinted
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns the total number of pages printed in the context of a meta print job. Call this method before ending the meta print job.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//to print multiple forms to one pdf document (on file system).
var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf')
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form 
one
two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
}
application.output('
form
total 
two
printed 
printed
pages: ' + plugins.pdf_output.
getPagesPrinted
getTotalPagesPrinted()
+ ' pages.'); } application.output('total printed pages: ' +
);
plugins.pdf_output.
getTotalPagesPrinted()); plugins.pdf_output.
endMetaPrintJob()

//to print multiple forms to one pdf document (to store in dataprovider).
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=insertFontDirectory|class=node}{tr:id=name}{td}h6.insertFontDirectory{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Number]{span}{span:id=iets|style=float: left; font-weight: bold;}insertFontDirectory{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Add a directory that should be searched for fonts. Call this only in the context of an active meta print job.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Number]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript} //Insert font directories for font embedding. //You must create an MetaPrintJob before using it. plugins.pdf_output.insertFontDirectory('c:/Windows/Fonts'); plugins.pdf_output.insertFontDirectory('c:/WinNT/Fonts'); plugins.pdf_output.insertFontDirectory('/Library/Fonts'); {code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=startMetaPrintJob|class=node}{tr:id=name}{td}h6.startMetaPrintJob{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[Boolean]{span}{span:id=iets|style=float: left; font-weight: bold;}startMetaPrintJob{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{tr:id=des}{td}Used for printing multiple things into the same PDF document. Starts a meta print job and all print calls made before ending the meta print job will be done into the same PDF document. If a file name is specified, then the PDF document is generated into that file. If no argument is specified, then the PDF document is stored in memory and can be retrieved when ending the meta print job and can be saved into a dataprovider, for example.{td}{tr}{tr:id=snc}{td}*Since*\\ Replace with version info{td}{tr}{tr:id=prs}{td}*Parameters*\\{td}{tr}{tr:id=ret}{td}*Returns*\\[Boolean]{td}{tr}{tr:id=see}{td}*Also see*\\{div:class=sIndent}{div}{td}{tr}{tr:id=link}{td}*External links*\\{div:class=sIndent}{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idinsertFontDirectory
classnode
Table Row (tr)
idname
Table Cell (td)
insertFontDirectory
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
insertFontDirectory
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Add a directory that should be searched for fonts. Call this only in the context of an active meta print job.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//Insert font directories for font embedding.
//You must create an MetaPrintJob before using it.
plugins.pdf_output.insertFontDirectory('c:/Windows/Fonts');
plugins.pdf_output.insertFontDirectory('c:/WinNT/Fonts');
plugins.pdf_output.insertFontDirectory('/Library/Fonts');
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idstartMetaPrintJob
classnode
Table Row (tr)
idname
Table Cell (td)
startMetaPrintJob
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Boolean
Span
stylefloat: left; font-weight: bold;
idiets
startMetaPrintJob
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Used for printing multiple things into the same PDF document. Starts a meta print job and all print calls made before ending the meta print job will be done into the same PDF document. If a file name is specified, then the PDF document is generated into that file. If no argument is specified, then the PDF document is stored in memory and can be retrieved when ending the meta print job and can be saved into a dataprovider, for example.
Table Row (tr)
idret
Table Cell (td)
Returns
Boolean
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript

//to print multiple forms to one pdf document (on file system).
var success = plugins.pdf_output.startMetaPrintJob('c:/temp/out.pdf')
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
plugins.pdf_output.endMetaPrintJob()

//to print multiple forms to one pdf document (to store in dataprovider).
var success = plugins.pdf_output.startMetaPrintJob()
if (success)
{
forms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form one printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
forms.form_two.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
application.output('form two printed ' + plugins.pdf_output.getPagesPrinted() + ' pages.');
}
application.output('total printed pages: ' + plugins.pdf_output.getTotalPagesPrinted());
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}
Table Row (tr)
classlastDetailRow
Table Cell (td)