Child pages
  • pdf_output

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{hiddendiv:style=display:none}
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACTAUTO CHANGES FROMUPDATE THE PAGECONTENT ANDTHROUGH MERGETHE THEM BACK INTO SERVOY SOURCE{hiddenDOC GENERATOR{div}
{sub-sectiondiv:id=description|text=}{sub-sectiondiv}\\ 

{table:id=|class=servoy sSummary}{colgroup}{column:width=80px|padding=0px}{column}{column}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=2}Method Summary{th}{tr}{tbody}{tr}{td}byte[]{td}{td}[#addMetaData]\(data, metaData)
Add metadata to the PDF, like Author{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#combinePDFDocuments]\(pdf_docs_bytearrays)
Combine multiple PDF docs into one.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#combineProtectedPDFDocuments]\(pdf_docs_bytearrays, pdf_docs_passwords)
Combine multiple protected PDF docs into one.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#convertPDFFormToPDFDocument]\(pdf_form, field_values)
Convert a PDF form to a PDF document.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#convertProtectedPDFFormToPDFDocument]\(pdf_form, pdf_password, field_values)
Convert a protected PDF form to a PDF document.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#encrypt]\(data, ownerPassword)
Add password protection and security options to the PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#encrypt]\(data, ownerPassword, userPassword)
Add password protection and security options to the PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#encrypt]\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders)
Add password protection and security options to the PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#encrypt]\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit)
Add password protection and security options to the PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#encrypt]\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit, metaData)
Add password protection and security options to the PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#endMetaPrintJob]\()
Ends a previously started meta print job.{td}{tr}{tbody}{tbody}{tr}{td}[PrinterJob]{td}{td}[#getPDFPrinter]\()
Returns a PDF printer that can be used in print calls.{td}{tr}{tbody}{tbody}{tr}{td}[PrinterJob]{td}{td}[#getPDFPrinter]\(filename)
Returns a PDF printer that can be used in print calls.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getPagesPrinted]\()
Returns the number of pages printed by the last print call done in the context of a meta print job.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#getTotalPagesPrinted]\()
Returns the total number of pages printed in the context of a meta print job.{td}{tr}{tbody}{tbody}{tr}{td}[Number]{td}{td}[#insertFontDirectory]\(path)
Add a directory that should be searched for fonts.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#numberPages]\(data)
Add pages numbers to a PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#numberPages]\(data, fontSize, locationX, locationY, font, hexColor)
Add pages numbers to a PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#overlay]\(data, forOverlay)
Add some PDF based content over a PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#overlay]\(data, forOverlay, isOver)
Add some PDF based content over a PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#overlay]\(data, forOverlay, isOver, pages)
Add some PDF based content over a PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#overlay]\(data, forOverlay, pages)
Add some PDF based content over a PDF{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#overlayText]\(data, text)
Add text over every page at a 45 degree angle{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#overlayText]\(data, text, locationX, locationY, isOver, fontSize, font, hexColor)
Add text over every page at a 45 degree angle{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#startMetaPrintJob]\()
Used for printing multiple things into the same PDF document.{td}{tr}{tbody}{tbody}{tr}{td}[Boolean]{td}{td}[#startMetaPrintJob]\(filename)
Used for printing multiple things into the same PDF document.{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#watermark]\(data, image)
Add an image as a watermark on every page, or the pages specified as a parameter{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#watermark]\(data, image, locationX, locationY, isOver)
Add an image as a watermark on every page, or the pages specified as a parameter{td}{tr}{tbody}{tbody}{tr}{td}byte[]{td}{td}[#watermark]\(data, image, locationX, locationY, isOver, pages)
Add an image as a watermark on every page, or the pages specified as a parameter{td}{tr}{tbody}{table}\\ 

{table:id=function|class=servoy sDetail}{colgroup}{column:width=100%|padding=0px}{column}{colgroup}{tr:style=height: 30px;}{th:colspan=1}Method Details{th}{tr}{tbody:id=addMetaData-byteArray_Object|class=node}{tr:id=name}{td}h6.addMetaData{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}addMetaData{span}{span:id=iets|style=float: left;}\(data, metaData){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}{sub-section:addMetaData-byteArray_Object_des|trigger=button|text=}{sub-section}{sub-section:addMetaData-byteArray_Object_des|trigger=none|class=sIndent}Replace with description{sub-section*Parameters*\\{div:class=sIndent}\{byte[]} data -- the PDF
\{[Object]} metaData -- a JavaScript object (Scriptable) that contains the metadata as property/value pairs
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:addMetaData-byteArray_Object_snc|trigger=button|text=}{sub-section}{sub-section:addMetaData-byteArray_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}byte[] -- the PDF with metaData added{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:addMetaData-byteArray_Object_prs|trigger=button|text=}{sub-section}{sub-section:addMetaData-byteArray_Object_prs|trigger=none|class=sIndent}\{byte[]} data --div:class=sIndent}{code:language=javascript}
// Add metadata to the PDF
\{[Object]} metaData -- a JavaScript object (Scriptable) that contains the metadata as property/value pairs
{sub-section, like Author
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var metaData = { Author: 'Servoy' };
	pdfResult = elements.customer_id.addMetaData(data, metaData);
}
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:addMetaData-byteArray_Object_ret|trigger=button|text=}{sub-section}{sub-section:addMetaData-byteArray_Object_ret|trigger=none|class=sIndent}byte[] -- the PDF with metaData added{sub-section}{tr}{tbody}{tbody:id=combinePDFDocuments-ObjectArray}{tr:id=name}{td}h6.combinePDFDocuments{td}{tr}{builder-show:permission=edit}{tr:id=seesig}{td}*Also see*\\{sub-section:addMetaData-byteArray_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMetaData-byteArray_Object_see|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}combinePDFDocuments{span}{span}\(pdf_docs_bytearrays){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:addMetaData-byteArray_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:addMetaData-byteArray_Object_link|trigger=none}{sub-section}\{[Object]\[]} pdf_docs_bytearrays -- the array of documents to combine
{div}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:addMetaData-byteArray_Object_sam|trigger=button|text=}{sub-section}div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{sub-section:addMetaData-byteArray_Object_sam|trigger=none}{code:language=javascript}
// Add metadata to the PDF, like Author
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var metaData = { Author: 'Servoy' };
	pdfResult = elements.customer_id.addMetaData(data, metaData);
}
{code}{sub-sectioncode:language=javascript}
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=combinePDFDocumentscombineProtectedPDFDocuments-ObjectArray|class=node_ObjectArray}{tr:id=name}{td}h6.combinePDFDocumentscombineProtectedPDFDocuments{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}combinePDFDocumentscombineProtectedPDFDocuments{span}{span:id=iets|style=float: left;}\(pdf_docs_bytearrays, pdf_docs_passwords){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}{sub-section:combinePDFDocuments-ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:combinePDFDocuments-ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section*Parameters*\\{div:class=sIndent}\{[Object]\[]} pdf_docs_bytearrays -- the array of documents to combine
\{[Object]\[]} pdf_docs_passwords -- an array of passwords to use
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:combinePDFDocuments-ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:combinePDFDocuments-ObjectArray_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}byte[]{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:combinePDFDocuments-ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:combinePDFDocuments-ObjectArray_prs|trigger=none|class=sIndent}\{[Object]\[]div:class=sIndent}{code:language=javascript}
pdf_docsblob_bytearrayscolumn -- the array of documents to combine
{sub-section= 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:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:combinePDFDocuments-ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:combinePDFDocuments-ObjectArray_ret|trigger=none|class=sIndent}byte[]{sub-section}{tr}{tbody}{tbody:id=convertPDFFormToPDFDocument-byteArray_Object}{tr:id=name}{td}h6.convertPDFFormToPDFDocument{td}{tr}{builder-show:permission=edit}{tr:id=seesig}{td}*Also see*\\{sub-section:combinePDFDocuments-ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:combinePDFDocuments-ObjectArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}convertPDFFormToPDFDocument{span}{span}\(pdf_form, field_values){span}{td}{tr}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:combinePDFDocuments-ObjectArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:combinePDFDocuments-ObjectArray_link|trigger=none}{sub-section}\{byte[]} pdf_form -- the PDF Form to convert
\{[Object]} field_values -- the values to use
{div}{td}{tr}{builder-show}{tr:id=samret}{td}*SampleReturns*\\{sub-section:combinePDFDocuments-ObjectArray_sam|trigger=button|text=}{sub-section}div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{sub-section:combinePDFDocuments-ObjectArray_sam|trigger=none}{code:language=javascript}
pdf_blob_column = combinePDFDocuments(new Array(pdf_blob1,pdf_blob2,pdf_blob3));
{code}{sub-sectioncode:language=javascript}
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=combineProtectedPDFDocumentsconvertProtectedPDFFormToPDFDocument-ObjectArray_ObjectArray|class=nodebyteArray_String_Object}{tr:id=name}{td}h6.combineProtectedPDFDocumentsconvertProtectedPDFFormToPDFDocument{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}combineProtectedPDFDocumentsconvertProtectedPDFFormToPDFDocument{span}{span:id=iets|style=float: left;}\(pdf_docs_bytearraysform, pdf_docs_passwordspassword, field_values){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_des|trigger=button|text=}{sub-section}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_des|trigger=none|class=sIndent}Replace with description{sub-section*Parameters*\\{div:class=sIndent}\{byte[]} pdf_form -- the PDF Form to convert
\{[String]} pdf_password -- the password to use
\{[Object]} field_values -- the field values to use
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncret}{td}*SinceReturns*\\{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_snc|trigger=button|text=}{sub-section}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_snc|trigger=none|div:class=sIndent} Replace with version info{sub-sectionbyte[]{div}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_prs|trigger=button|text=}{sub-section}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_prs|trigger=none|class=sIndent}\{[Object]\[]} pdf_docs_bytearrays -- the array of documents to combine
\{[Object]\[]} pdf_docs_passwords -- an array of passwords to use
{sub-sectiondiv:class=sIndent}{code:language=javascript}
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:idclass=retlastDetailRow}{td}*Returns*\\{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_ret|trigger=button|text=}{sub-section}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{tbody}{tbody:id=encrypt-byteArray_String}{tr:id=name}{td}h6.encrypt{td}{tr}{builder-show:permission=edit}{tr:id=seesig}{td}*Also see*\\{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_see|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}encrypt{span}{span}\(data, ownerPassword){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_link|trigger=button|text=}{sub-section}div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_link|trigger=none}{sub-section}byte[] -- the encrypted PDF{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:combineProtectedPDFDocuments-ObjectArray_ObjectArray_sam|trigger=none}{code:language=javascript}
pdf_blob_column = combineProtectedPDFDocuments(new Array(pdf_blob1,pdf_blob2,pdf_blob3), new Array(pdf_blob1_pass,pdf_blob2_pass,pdf_blob3_pass));
{code}{sub-section// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=convertPDFFormToPDFDocumentencrypt-byteArray_Object|class=nodeString_String}{tr:id=name}{td}h6.convertPDFFormToPDFDocumentencrypt{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}convertPDFFormToPDFDocumentencrypt{span}{span:id=iets|style=float: left;}\(pdf_formdata, ownerPassword, field_valuesuserPassword){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_des|trigger=button|text=}{sub-section}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_des|trigger=none|class=sIndent}Replace with description{sub-section*Parameters*\\{div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
\{[String]} userPassword -- the user password
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Sincetr:id=ret}{td}*Returns*\\{sub-section:convertPDFFormToPDFDocument-byteArray_Object_snc|trigger=button|text=}{sub-section}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_snc|trigger=none|div:class=sIndent}byte[] Replace-- withthe versionencrypted infoPDF{sub-sectiondiv}{td}{tr}{builder-show}{tr:id=prssam}{td}*ParametersSample*\\{sub-section:convertPDFFormToPDFDocument-byteArray_Object_prs|trigger=button|text=}{sub-section}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_prs|trigger=none|class=sIndent}\{byte[]} pdf_form -- the PDF Form to convert
\{[Object]} field_values -- the values to use
{sub-sectiondiv:class=sIndent}{code:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:convertPDFFormToPDFDocument-byteArray_Object_ret|trigger=button|text=}{sub-section}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr}{tbody}{tbody:id=encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean}{tr:id=name}{td}h6.encrypt{td}{tr}{tr:id=seesig}{td}*Also see*\\{sub-section:convertPDFFormToPDFDocument-byteArray_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertPDFFormToPDFDocument-byteArray_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_link|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}encrypt{span}{span}\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders){span}{td}{tr}{builder-show}{tr:id=samprs}{td}*SampleParameters*\\{sub-section:convertPDFFormToPDFDocument-byteArray_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:convertPDFFormToPDFDocument-byteArray_Object_sam|trigger=none}{code:language=javascript}
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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
\{[String]} userPassword -- the user password
\{[Boolean]} allowAssembly -- whether to set the allow assembly permission
\{[Boolean]} allowCopy -- whether to set the allow copy permission
\{[Boolean]} allowDegradedPrinting -- whether to set the allow degraded printing permission
\{[Boolean]} allowFillIn -- whether to set the allow fill in permission
\{[Boolean]} allowModifyAnnotations -- whether to set the allow modify annotations permission
\{[Boolean]} allowModifyContents -- whether to set the allow modify contents permission
\{[Boolean]} allowPrinting -- whether to set the allow printing permission
\{[Boolean]} allowScreenreaders -- whether to set the allow screen readers permission
{div}{td}{tr}{tbody}{tbodytr:id=convertProtectedPDFFormToPDFDocument-byteArray_String_Object|class=node}{tr:id=name}{td}h6.convertProtectedPDFFormToPDFDocumentret}{td}*Returns*\\{div:class=sIndent}byte[] -- the encrypted PDF{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{spandiv: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, field_values){spanclass=sIndent}{code:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{div}{td}{tr}{builder-show:permission=edit}{tr:id=destr:class=lastDetailRow}{td}{td}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_des|trigger=button|text=}{sub-section}{sub-section:convertProtectedPDFFormToPDFDocumenttr}{tbody}{tbody:id=encrypt-byteArray_String_Object_des|trigger=none|class=sIndent}Replace with description{sub-section}_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean}{tr:id=name}{td}h6.encrypt{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncsig}{td}*Since*\\{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_snc|trigger=button|text=}{sub-section}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}encrypt{span}{span}\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit){span}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_prs|trigger=button|text=}{sub-section}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_prs|trigger=none|div:class=sIndent}\{byte[]} pdf_formdata -- the PDF
Form to convert
\{[String]} pdf_passwordownerPassword -- the owner password to use
\{[ObjectString]} field_valuesuserPassword -- the fielduser values to use
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_ret|trigger=button|text=}{sub-section}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_link|trigger=button|text=}{sub-section}password
\{[Boolean]} allowAssembly -- whether to set the allow assembly permission
\{[Boolean]} allowCopy -- whether to set the allow copy permission
\{[Boolean]} allowDegradedPrinting -- whether to set the allow degraded printing permission
\{[Boolean]} allowFillIn -- whether to set the allow fill in permission
\{[Boolean]} allowModifyAnnotations -- whether to set the allow modify annotations permission
\{[Boolean]} allowModifyContents -- whether to set the allow modify contents permission
\{[Boolean]} allowPrinting -- whether to set the allow printing permission
\{[Boolean]} allowScreenreaders -- whether to set the allow screen readers permission
\{[Boolean]} is128bit -- whether to use 128\-bit encryption
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[] -- the encrypted PDF{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:convertProtectedPDFFormToPDFDocument-byteArray_String_Object_sam|trigger=none}{code:language=javascript}
var pdfformcode:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.readFile('c:/temp/1040a-form.pdf');
//var field_valuesshowFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile('c:/temp/1040a-data.fdf'unEncryptedFile);//read
adobe	encryptedResult 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}{sub-section= elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=encrypt-byteArray_String|class=node}{tr:id=_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object}{tr:id=name}{td}h6.encrypt{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}encrypt{span}{span:id=iets|style=float: left;}\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit, metaData){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}{sub-section:encrypt-byteArray_String_des|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:encrypt-byteArray_String_snc|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:encrypt-byteArray_String_prs|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
{sub-section}*Parameters*\\{div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
\{[String]} userPassword -- the user password
\{[Boolean]} allowAssembly -- whether to set the allow assembly permission
\{[Boolean]} allowCopy -- whether to set the allow copy permission
\{[Boolean]} allowDegradedPrinting -- whether to set the allow degraded printing permission
\{[Boolean]} allowFillIn -- whether to set the allow fill in permission
\{[Boolean]} allowModifyAnnotations -- whether to set the allow modify annotations permission
\{[Boolean]} allowModifyContents -- whether to set the allow modify contents permission
\{[Boolean]} allowPrinting -- whether to set the allow printing permission
\{[Boolean]} allowScreenreaders -- whether to set the allow screen readers permission
\{[Boolean]} is128bit -- whether to use 128\-bit encryption
\{[Object]} metaData -- a JavaScript object (Scriptable) that contains the metadata as property/value pairs
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:encrypt-byteArray_String_ret|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_ret|trigger=none|div:class=sIndent}byte[] -- the encrypted PDF{sub-sectiondiv}{td}{tr}{builder-show:permission=edit}{tr:id=seesam}{td}*Also seeSample*\\{sub-section:encrypt-byteArray_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:encrypt-byteArray_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:encrypt-byteArray_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_sam|trigger=nonediv:class=sIndent}{code:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=endMetaPrintJob}{tr:id=name}{td}h6.endMetaPrintJob{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}endMetaPrintJob{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//to Addprint passwordmultiple protection and security options forms to theone PDFpdf // NOTE: Passwords are case sensitive 
var unEncryptedFiledocument (on file system).
var success = plugins.filepdf_output.showFileOpenDialog();
if (unEncryptedFilestartMetaPrintJob('c:/temp/out.pdf')
if (success)
{
	var data = plugins.file.readFile(unEncryptedFileforms.form_one.controller.print(false,false,plugins.pdf_output.getPDFPrinter());
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=encrypt-byteArray_String_String|class=node}{tr:id=name}{td}h6.encrypt{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}encrypt{span}{span:id=iets|style=float: left;}\(data, ownerPassword, userPassword){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:encrypt-byteArray_String_String_des|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:encrypt-byteArray_String_String_snc|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-sectionapplication.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}{tbody:id=getPDFPrinter}{tr:id=name}{td}h6.getPDFPrinter{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[PrinterJob]{span}{span:style=font-weight: bold;}getPDFPrinter{span}{span}\(){span}{td}{tr}{builder-show}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:encrypt-byteArray_String_String_prs|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_prs|trigger=none|div:class=sIndent}[PrinterJob]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
\{[String]} userPassword -- the user password
{sub-section{code:language=javascript}
//to print current record without printdialog to pdf file in temp dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter());
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:encrypt-byteArray_String_String_ret|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_ret|trigger=none|class=sIndent}byte[] -- the encrypted PDF{sub-section}}{tr}{tbody}{tbody:id=getPDFPrinter-String}{tr:id=name}{td}h6.getPDFPrinter{td}{tr}{builder-show:permission=edit}{tr:id=seesig}{td}*Also see*\\{sub-section:encrypt-byteArray_String_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_see|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}[PrinterJob]{span}{span:style=font-weight: bold;}getPDFPrinter{span}{span}\(filename){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkprs}{td}*External linksParameters*\\{sub-section:encrypt-byteArray_String_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_link|trigger=none}{sub-section}div:class=sIndent}\{[String]} filename -- the file name
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[PrinterJob]{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:encrypt-byteArray_String_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_sam|trigger=none}{code:language=javascript}
//to Addprint passwordcurrent protectionrecord andwithout securityprintdialog options to thepdf PDFfile //in NOTE:temp Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf'));
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean|class=nodegetPagesPrinted}{tr:id=name}{td}h6.encryptgetPagesPrinted{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[Number]{span}{span:id=iets|style=float: left; style=font-weight: bold;}encryptgetPagesPrinted{span}{span:id=iets|style=float: left;}\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders){span}{td}{tr}{builder-show:permission=edittr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=dessam}{td}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_des|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
\{[String]} userPassword -- the user password
\{[Boolean]} allowAssembly -- whether to set the allow assembly permission
\{[Boolean]} allowCopy -- whether to set the allow copy permission
\{[Boolean]} allowDegradedPrinting -- whether to set the allow degraded printing permission
\{[Boolean]} allowFillIn -- whether to set the allow fill in permission
\{[Boolean]} allowModifyAnnotations -- whether to set the allow modify annotations permission
\{[Boolean]} allowModifyContents -- whether to set the allow modify contents permission
\{[Boolean]} allowPrinting -- whether to set the allow printing permission
\{[Boolean]} allowScreenreaders -- whether to set the allow screen readers permission
{sub-section}*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.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}{tbody:id=getTotalPagesPrinted}{tr:id=name}{td}h6.getTotalPagesPrinted{td}{tr}{tr:id=retsig}{td}*Returns*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_ret|trigger=none|class=sIndent}byte[] -- the encrypted PDF{sub-section{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}getTotalPagesPrinted{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{builder-show:permission=edit}{tr:id=seesam}{td}*Also seeSample*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_see|trigger=none}{sub-section{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.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}{builder-show}{builder-show:permission=edit}{tr:id=linktr:class=lastDetailRow}{td}{td}*External links*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show{tr}{tbody}{tbody:id=insertFontDirectory-String}{tr:id=name}{td}h6.insertFontDirectory{td}{tr}{tr:id=samsig}{td}*Sample*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_sam|trigger=button|text=}{sub-section}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}insertFontDirectory{span}{span}\(path){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_sam|trigger=none}{code:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{sub-section\{[String]} path -- the path to use
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{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=encryptnumberPages-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean|class=node}{tr:id=name}{td}h6.encryptnumberPages{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}encryptnumberPages{span}{span:id=iets|style=float: left;}\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit){span}{td}{tr}{builder-show:permission=edit}{tr:id=desprs}{td}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_des|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit*Parameters*\\{div:class=sIndent}\{byte[]} data -- the PDF
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[] -- the PDF with numbered pages{div}{td}{tr}{tr:id=sncsam}{td}*SinceSample*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}{code:language=javascript}
// Add pages numbers to a PDF
var unNumberedFile = plugins.file.showFileOpenDialog();
if (unNumberedFile) {
	var data = plugins.file.readFile(unNumberedFile);
	pageNumberedPdf = elements.customer_id.numberPages(data, 12, 520, 30, 'Courier', '#ff0033');
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=numberPages-byteArray_Number_Number_Number_String_String}{tr:id=name}{td}h6.numberPages{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}numberPages{span}{span}\(data, fontSize, locationX, locationY, font, hexColor){span}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_prs|trigger=none|class=sIndent}\{byte[]} databyte[]} data -- the PDF
\{[Number]} fontSize -- the PDF font size to use
\{[StringNumber]} ownerPasswordlocationX -- the ownerx password
\{[String]} userPassword --location of the user passwordnumbers
\{[BooleanNumber]} allowAssemblylocationY -- the whethery tolocation setof the allow assemblynumbers
permission
\{[BooleanString]} allowCopyfont -- whether to set the allowfont copyto permissionuse
\{[BooleanString]} allowDegradedPrintinghexColor -- whetherthe tofont setcolor theto allow degraded printing permission
\{[Boolean]} allowFillIn -- whether to set the allow fill in permission
\{[Boolean]} allowModifyAnnotations -- whether to set the allow modify annotations permission
\{[Boolean]} allowModifyContents -- whether to set the allow modify contents permission
\{[Boolean]} allowPrinting -- whether to set the allow printing permission
\{[Boolean]} allowScreenreaders -- whether to set the allow screen readers permission
\{[Boolean]} is128bit -- whether to use 128\-bit encryption
{sub-sectionuse
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[] -- the PDF with numbered pages{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Add pages numbers to a PDF
var unNumberedFile = plugins.file.showFileOpenDialog();
if (unNumberedFile) {
	var data = plugins.file.readFile(unNumberedFile);
	pageNumberedPdf = elements.customer_id.numberPages(data, 12, 520, 30, 'Courier', '#ff0033');
}
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_ret|trigger=none|class=sIndent}byte[] -- the encrypted PDF{sub-section}{tr}{tbody}{tbody:id=overlay-byteArray_byteArray}{tr:id=name}{td}h6.overlay{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}overlay{span}{span}\(data, forOverlay){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{div:class=sIndent}\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_see|trigger=button|text=}{sub-section}byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_see|trigger=none}{sub-section}byte[] -- the PDF with added overlay{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksam}{td}*External linksSample*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_sam|trigger=none}{code:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object|class=node}{tr:id=name}{td}h6.encrypt{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}encrypt{span}{span:id=iets|style=float: left;}\(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit, metaData){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_des|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_snc|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_prs|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[String]} ownerPassword -- the owner password
\{[String]} userPassword -- the user password
\{[Boolean]} allowAssembly -- whether to set the allow assembly permission
\{[Boolean]} allowCopy -- whether to set the allow copy permission
\{[Boolean]} allowDegradedPrinting -- whether to set the allow degraded printing permission
\{[Boolean]} allowFillIn -- whether to set the allow fill in permission
\{[Boolean]} allowModifyAnnotations -- whether to set the allow modify annotations permission
\{[Boolean]} allowModifyContents -- whether to set the allow modify contents permission
\{[Boolean]} allowPrinting -- whether to set the allow printing permission
\{[Boolean]} allowScreenreaders -- whether to set the allow screen readers permission
\{[Boolean]} is128bit -- whether to use 128\-bit encryption
\{[Object]} metaData -- a JavaScript object (Scriptable) that contains the metadata as property/value pairs
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_ret|trigger=button|text=}{sub-section}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_ret|trigger=none|class=sIndent}byte[] -- the encrypted PDF{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object_sam|trigger=none}{code:language=javascript}
// Add password protection and security options to the PDF
// NOTE: Passwords are case sensitive 
var unEncryptedFile = plugins.file.showFileOpenDialog();
if (unEncryptedFile) {
	var data = plugins.file.readFile(unEncryptedFile);
	encryptedResult = elements.customer_id.encrypt(data, 'secretPassword', 'secretUserPassword', false, false, false, false, false, false, false, false, true);
}
{code}{sub-section}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:endMetaPrintJob_des|trigger=button|text=}{sub-section}{sub-section:endMetaPrintJob_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:endMetaPrintJob_snc|trigger=button|text=}{sub-section}{sub-section:endMetaPrintJob_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:endMetaPrintJob_prs|trigger=button|text=}{sub-section}{sub-section:endMetaPrintJob_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:endMetaPrintJob_ret|trigger=button|text=}{sub-section}{sub-section:endMetaPrintJob_ret|trigger=none|class=sIndent}byte[]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:endMetaPrintJob_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:endMetaPrintJob_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:endMetaPrintJob_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:endMetaPrintJob_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:endMetaPrintJob_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:endMetaPrintJob_sam|trigger=none}{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.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}{sub-section}{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;}[PrinterJob]{span}{span:id=iets|style=float: left; font-weight: bold;}getPDFPrinter{span}{span:id=iets|style=float: left;}\(){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getPDFPrinter_des|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPDFPrinter_snc|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getPDFPrinter_prs|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getPDFPrinter_ret|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter_ret|trigger=none|class=sIndent}[PrinterJob]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPDFPrinter_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPDFPrinter_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPDFPrinter_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPDFPrinter_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPDFPrinter_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPDFPrinter_sam|trigger=none}{code:language=javascript}
//to print current record without printdialog to pdf file in temp dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter());
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=getPDFPrinter-String|class=node}{tr:id=name}{td}h6.getPDFPrinter{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}[PrinterJob]{span}{span:id=iets|style=float: left; font-weight: bold;}getPDFPrinter{span}{span:id=iets|style=float: left;}\(filename){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getPDFPrinter-String_des|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPDFPrinter-String_snc|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:getPDFPrinter-String_prs|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter-String_prs|trigger=none|class=sIndent}\{[String]} filename -- the file name
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:getPDFPrinter-String_ret|trigger=button|text=}{sub-section}{sub-section:getPDFPrinter-String_ret|trigger=none|class=sIndent}[PrinterJob]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPDFPrinter-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPDFPrinter-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPDFPrinter-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPDFPrinter-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPDFPrinter-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPDFPrinter-String_sam|trigger=none}{code:language=javascript}
//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}{sub-section}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getPagesPrinted_des|trigger=button|text=}{sub-section}{sub-section:getPagesPrinted_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getPagesPrinted_snc|trigger=button|text=}{sub-section}{sub-section:getPagesPrinted_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getPagesPrinted_prs|trigger=button|text=}{sub-section}{sub-section:getPagesPrinted_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getPagesPrinted_ret|trigger=button|text=}{sub-section}{sub-section:getPagesPrinted_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getPagesPrinted_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPagesPrinted_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getPagesPrinted_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPagesPrinted_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getPagesPrinted_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getPagesPrinted_sam|trigger=none}{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.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}{sub-section}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:getTotalPagesPrinted_des|trigger=button|text=}{sub-section}{sub-section:getTotalPagesPrinted_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:getTotalPagesPrinted_snc|trigger=button|text=}{sub-section}{sub-section:getTotalPagesPrinted_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=prs}{td}*Parameters*\\{sub-section:getTotalPagesPrinted_prs|trigger=button|text=}{sub-section}{sub-section:getTotalPagesPrinted_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-show}{tr:id=ret}{td}*Returns*\\{sub-section:getTotalPagesPrinted_ret|trigger=button|text=}{sub-section}{sub-section:getTotalPagesPrinted_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:getTotalPagesPrinted_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTotalPagesPrinted_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:getTotalPagesPrinted_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTotalPagesPrinted_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:getTotalPagesPrinted_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:getTotalPagesPrinted_sam|trigger=none}{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.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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=insertFontDirectory-String|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;}\(path){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:insertFontDirectory-String_des|trigger=button|text=}{sub-section}{sub-section:insertFontDirectory-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:insertFontDirectory-String_snc|trigger=button|text=}{sub-section}{sub-section:insertFontDirectory-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:insertFontDirectory-String_prs|trigger=button|text=}{sub-section}{sub-section:insertFontDirectory-String_prs|trigger=none|class=sIndent}\{[String]} path -- the path to use
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:insertFontDirectory-String_ret|trigger=button|text=}{sub-section}{sub-section:insertFontDirectory-String_ret|trigger=none|class=sIndent}[Number]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:insertFontDirectory-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:insertFontDirectory-String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:insertFontDirectory-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:insertFontDirectory-String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:insertFontDirectory-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:insertFontDirectory-String_sam|trigger=none}{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}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=numberPages-byteArray|class=node}{tr:id=name}{td}h6.numberPages{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}numberPages{span}{span:id=iets|style=float: left;}\(data){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:numberPages-byteArray_des|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:numberPages-byteArray_snc|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:numberPages-byteArray_prs|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:numberPages-byteArray_ret|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_ret|trigger=none|class=sIndent}byte[] -- the PDF with numbered pages{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:numberPages-byteArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberPages-byteArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:numberPages-byteArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberPages-byteArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:numberPages-byteArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberPages-byteArray_sam|trigger=none}{code:language=javascript}
// Add pages numbers to a PDF
var unNumberedFile = plugins.file.showFileOpenDialog();
if (unNumberedFile) {
	var data = plugins.file.readFile(unNumberedFile);
	pageNumberedPdf = elements.customer_id.numberPages(data, 12, 520, 30, 'Courier', '#ff0033');
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=numberPages-byteArray_Number_Number_Number_String_String|class=node}{tr:id=name}{td}h6.numberPages{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}numberPages{span}{span:id=iets|style=float: left;}\(data, fontSize, locationX, locationY, font, hexColor){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_des|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:numberPages-byteArray_Number_Number_Number_String_String_snc|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:numberPages-byteArray_Number_Number_Number_String_String_prs|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[Number]} fontSize -- the font size to use
\{[Number]} locationX -- the x location of the numbers
\{[Number]} locationY -- the y location of the numbers
\{[String]} font -- the font to use
\{[String]} hexColor -- the font color to use
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:numberPages-byteArray_Number_Number_Number_String_String_ret|trigger=button|text=}{sub-section}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_ret|trigger=none|class=sIndent}byte[] -- the PDF with numbered pages{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:numberPages-byteArray_Number_Number_Number_String_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:numberPages-byteArray_Number_Number_Number_String_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:numberPages-byteArray_Number_Number_Number_String_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:numberPages-byteArray_Number_Number_Number_String_String_sam|trigger=none}{code:language=javascript}
// Add pages numbers to a PDF
var unNumberedFile = plugins.file.showFileOpenDialog();
if (unNumberedFile) {
	var data = plugins.file.readFile(unNumberedFile);
	pageNumberedPdf = elements.customer_id.numberPages(data, 12, 520, 30, 'Courier', '#ff0033');
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlay-byteArray_byteArray|class=node}{tr:id=name}{td}h6.overlay{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}overlay{span}{span:id=iets|style=float: left;}\(data, forOverlay){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:overlay-byteArray_byteArray_des|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:overlay-byteArray_byteArray_snc|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:overlay-byteArray_byteArray_prs|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:overlay-byteArray_byteArray_ret|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_ret|trigger=none|class=sIndent}byte[] -- the PDF with added overlay{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:overlay-byteArray_byteArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:overlay-byteArray_byteArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:overlay-byteArray_byteArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_sam|trigger=none}{code:language=javascript}
// Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlay-byteArray_byteArray_Boolean|class=node}{tr:id=name}{td}h6.overlay{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}overlay{span}{span:id=iets|style=float: left;}\(data, forOverlay, isOver){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:overlay-byteArray_byteArray_Boolean_des|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:overlay-byteArray_byteArray_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:overlay-byteArray_byteArray_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
\{[Boolean]} isOver -- whether the overlay will be put over the content
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:overlay-byteArray_byteArray_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_ret|trigger=none|class=sIndent}byte[] -- the PDF with added overlay{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:overlay-byteArray_byteArray_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_Boolean_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:overlay-byteArray_byteArray_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_Boolean_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:overlay-byteArray_byteArray_Boolean_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_Boolean_sam|trigger=none}{code:language=javascript}
// Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlay-byteArray_byteArray_Boolean_StringArray|class=node}{tr:id=name}{td}h6.overlay{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}overlay{span}{span:id=iets|style=float: left;}\(data, forOverlay, isOver, pages){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_des|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_snc|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_prs|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
\{[Boolean]} isOver -- whether the overlay will be put over the content
\{[String]\[]} pages -- an array of page numbers to put the overlay on
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_ret|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_ret|trigger=none|class=sIndent}byte[] -- the PDF with added overlay{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_Boolean_StringArray_sam|trigger=none}{code:language=javascript}
// Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlay-byteArray_byteArray_StringArray|class=node}{tr:id=name}{td}h6.overlay{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}overlay{span}{span:id=iets|style=float: left;}\(data, forOverlay, pages){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:overlay-byteArray_byteArray_StringArray_des|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_StringArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:overlay-byteArray_byteArray_StringArray_snc|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:overlay-byteArray_byteArray_StringArray_prs|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_StringArray_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
\{[String]\[]} pages -- an array of page numbers to put the overlay on
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:overlay-byteArray_byteArray_StringArray_ret|trigger=button|text=}{sub-section}{sub-section:overlay-byteArray_byteArray_StringArray_ret|trigger=none|class=sIndent}byte[] -- the PDF with added overlay{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:overlay-byteArray_byteArray_StringArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:overlay-byteArray_byteArray_StringArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_StringArray_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:overlay-byteArray_byteArray_StringArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlay-byteArray_byteArray_StringArray_sam|trigger=none}{code:language=javascript}
// Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlayText-byteArray_String|class=node}{tr:id=name}{td}h6.overlayText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}overlayText{span}{span:id=iets|style=float: left;}\(data, text){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:overlayText-byteArray_String_des|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:overlayText-byteArray_String_snc|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:overlayText-byteArray_String_prs|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[String]} text -- the text to use for the overlay
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:overlayText-byteArray_String_ret|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_ret|trigger=none|class=sIndent}byte[] -- the PDF with added overlay{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:overlayText-byteArray_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlayText-byteArray_String_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=link}{td}*External links*\\{sub-section:overlayText-byteArray_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlayText-byteArray_String_link|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:overlayText-byteArray_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlayText-byteArray_String_sam|trigger=none}{code:language=javascript}
// Add text over every page at a 45 degree angle\m
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	modifiedPdf = elements.customer_id.overlayText(data, 'DRAFT', 230, 430, true, 32, 'Helvetica', '#33ff33');
}
{code}{sub-sectiondiv:class=sIndent}{code:language=javascript}
// Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlayTextoverlay-byteArray_String_Number_NumberbyteArray_Boolean_Number_String_String|class=node}{tr:id=name}{td}h6.overlayText{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}overlayText{span}{span:id=iets|style=float: left;}\(data, text, locationX, locationY, isOver, fontSize, font, hexColor){span}overlay{td}{tr}{builder-show:permission=edit}{tr:id=dessig}{td}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_des|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_des|trigger=none|class=sIndent}Replace with description{sub-sectionspan:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}overlay{span}{span}\(data, forOverlay, isOver){span}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=sncprs}{td}*SinceParameters*\\{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_snc|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiondiv:class=sIndent}\{byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
\{[Boolean]} isOver -- whether the overlay will be put over the content
{div}{td}{tr}{builder-show}{tr:id=prsret}{td}*ParametersReturns*\\{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_prs|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[String]} text -- the text to use for the overlay
\{[Number]} locationX -- the x location of the overlay
\{[Number]} locationY -- the y location of the overlay
\{[Boolean]} isOver -- whether to put the overlay over the content
\{[Number]} fontSize -- the font size to use
\{[String]} font -- the font to use
\{[String]} hexColor -- the font color to use
{sub-sectiondiv:class=sIndent}byte[] -- the PDF with added overlay{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{div}{td}{tr}{tr:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_ret|trigger=button|text=}{sub-section}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_ret|trigger=none|class=sIndent}byte[] -- the PDF with added overlay{sub-section}{tr}{tbody}{tbody:id=overlay-byteArray_byteArray_Boolean_StringArray}{tr:id=name}{td}h6.overlay{td}{tr}{builder-showtr:permission=editid=sig}{td}{trspan:id=see}{td}*Also see*\\{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_see|trigger=button|text=}{sub-section}style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}overlay{span}{span}\(data, forOverlay, isOver, pages){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{byte[]}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_see|trigger=none}{sub-section} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
\{[Boolean]} isOver -- whether the overlay will be put over the content
\{[String]\[]} pages -- an array of page numbers to put the overlay on
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_link|trigger=none}{sub-section}byte[] -- the PDF with added overlay{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:overlayText-byteArray_String_Number_Number_Boolean_Number_String_String_sam|trigger=none{div:class=sIndent}{code:language=javascript}
// Add text over every page at a 45 degree angle\m
var pdf = plugins.file.showFileOpenDialog();
if (pdf some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var datadata2 = plugins.file.readFile(pdfinput2);
	modifiedPdf	overlayedPdf = elements.customer_id.overlayTextoverlay( data, 'DRAFT'data2, 230false, 430, true, 32, 'Helvetica', '#33ff33'pages );
}
{code}{sub-section}{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}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:startMetaPrintJob_des|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:startMetaPrintJob_snc|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob_snc|trigger=none|class=sIndent} Replace with version info{sub-section		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{builder-showtbody}{builder-showtbody:permission=editid=overlay-byteArray_byteArray_StringArray}{tr:id=prsname}{td}*Parameters*\\{sub-section:startMetaPrintJob_prs|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob_prs|trigger=none|class=sIndent}{sub-section}{td}{tr}{builder-showh6.overlay{td}{tr}{tr:id=retsig}{td}*Returns*\\{sub-section:startMetaPrintJob_ret|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob_ret|trigger=none|class=sIndent}[Boolean]{sub-section{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}overlay{span}{span}\(data, forOverlay, pages){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:startMetaPrintJob_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:startMetaPrintJob_see|trigger=none}{sub-section}div:class=sIndent}\{byte[]} data -- the PDF
\{byte[]} forOverlay -- a PDF to use as overlay
\{[String]\[]} pages -- an array of page numbers to put the overlay on
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:startMetaPrintJob_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:startMetaPrintJob_link|trigger=none}{sub-section}byte[] -- the PDF with added overlay{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:startMetaPrintJob_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:startMetaPrintJob_sam|trigger=nonediv: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.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}{sub-section}{ Add some PDF based content over a PDF
var pages = new Array();
pages[0] = '1';
pages[1] = '3';
pages[2] = '5';
var input1 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select source file');
if (input1) {
	var data = plugins.file.readFile(input1);
	var input2 = plugins.file.showFileOpenDialog(1,null,false,'pdf',null,'Select file for overlay');
	if (input2) {
		var data2 = plugins.file.readFile(input2);
		overlayedPdf = elements.customer_id.overlay( data, data2, false, pages );
		//overlayedPdf = elements.customer_id.overlay( data, data2 );
		//overlayedPdf = elements.customer_id.overlay( data, data2, false, null );
		//overlayedPdf = elements.customer_id.overlay( data, data2, pages );
	}
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlayText-byteArray_String}{tr:id=name}{td}h6.overlayText{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}overlayText{span}{span}\(data, text){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} text -- the text to use for the overlay
{div}{td}{tr}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=startMetaPrintJob-String|class=node}{tr:id=name}{td}h6.startMetaPrintJob*Returns*\\{div:class=sIndent}byte[] -- the PDF with added overlay{div}{td}{tr}{tr:id=sigsam}{td}*Sample*\\{div:class=sIndent}{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;}\(filename){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:startMetaPrintJob-String_des|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob-String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:startMetaPrintJob-String_snc|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob-String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-showcode:language=javascript}
// Add text over every page at a 45 degree angle\m
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	modifiedPdf = elements.customer_id.overlayText(data, 'DRAFT', 230, 430, true, 32, 'Helvetica', '#33ff33');
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=overlayText-byteArray_String_Number_Number_Boolean_Number_String_String}{tr:id=name}{td}h6.overlayText{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}overlayText{span}{span}\(data, text, locationX, locationY, isOver, fontSize, font, hexColor){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{sub-section:startMetaPrintJob-String_prs|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob-String_prs|trigger=none|class=sIndent}div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} filenametext -- the file name
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:startMetaPrintJob-String_ret|trigger=button|text=}{sub-section}{sub-section:startMetaPrintJob-String_ret|trigger=none|class=sIndent}[Boolean]{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:startMetaPrintJob-String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:startMetaPrintJob-String_see|trigger=none}{sub-section} text to use for the overlay
\{[Number]} locationX -- the x location of the overlay
\{[Number]} locationY -- the y location of the overlay
\{[Boolean]} isOver -- whether to put the overlay over the content
\{[Number]} fontSize -- the font size to use
\{[String]} font -- the font to use
\{[String]} hexColor -- the font color to use
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:startMetaPrintJob-String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:startMetaPrintJob-String_link|trigger=none}{sub-section}byte[] -- the PDF with added overlay{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:startMetaPrintJob-String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:startMetaPrintJob-String_sam|trigger=none}{code:language=javascript}
//to printAdd multipletext formsover toevery onepage pdfat documenta (on45 file system).degree angle\m
var successpdf = plugins.pdf_outputfile.startMetaPrintJob('c:/temp/out.pdf')showFileOpenDialog();
if (successpdf) {
	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()

var data = plugins.file.readFile(pdf);
	modifiedPdf = elements.customer_id.overlayText(data, 'DRAFT', 230, 430, true, 32, 'Helvetica', '#33ff33');
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=startMetaPrintJob}{tr:id=name}{td}h6.startMetaPrintJob{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}startMetaPrintJob{span}{span}\(){span}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
//to print multiple forms to one pdf document (toon storefile in dataprovidersystem).
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());
mediaDataProvider = plugins.pdf_output.endMetaPrintJob()
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=watermark-byteArray_String|class=node}{tr:id=name}{td}h6.watermark{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}watermark{span}{span:id=iets|style=float: left;}\(data, image){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:watermark-byteArray_String_des|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:watermark-byteArray_String_snc|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_snc|trigger=none|class=sIndent} Replace with version info{sub-section}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:watermark-byteArray_String_prs|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_prs|trigger=none|class=sIndent}\{byte[]} data -- the PDF
\{[String]} image -- the path of an image to use
{sub-section

//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:id=retclass=lastDetailRow}{td}{td}*Returns*\\{sub-section:watermark-byteArray_String_ret|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_ret|trigger=none|class=sIndent}byte[] -- the PDF with added watermak{sub-section}{tr}{tbody}{tbody:id=startMetaPrintJob-String}{tr:id=name}{td}h6.startMetaPrintJob{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}startMetaPrintJob{span}{span}\(filename){span}{td}{tr}{builder-show:permission=edit}{tr:id=seeprs}{td}*Also seeParameters*\\{sub-section:watermark-byteArray_String_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_see|trigger=none}{sub-section}\{[String]} filename -- the file name
{div}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:watermark-byteArray_String_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_link|trigger=none}{sub-section}sIndent}[Boolean]{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:watermark-byteArray_String_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_sam|trigger=none}{code:language=javascript}
// Add an image as a watermark on every page, or the pages specified as a parameter.
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var image = plugins.file.showFileOpenDialog();
	modifiedPdf = elements.customer_id.watermark(data, image);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=watermark-byteArray_String_Number_Number_Boolean|class=node}{tr:id=name}{td}h6.watermark{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}watermark{span}{span:id=iets|style=float: left;}\(data, image, locationX, locationY, isOver){span{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.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}{builder-showtr:permissionclass=editlastDetailRow}{tr:id=destd}{td}{sub-section:watermark-byteArray_String_Number_Number_Boolean_des|trigger=button|text=}{sub-section}{sub-section:tr}{tbody}{tbody:id=watermark-byteArray_String_Number_Number_Boolean_des|trigger=none|class=sIndent}Replace with description{sub-section}}{tr:id=name}{td}h6.watermark{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_snc|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_Number_Number_Boolean_snc|trigger=none|class=sIndent} Replace with version info{sub-sectiontr:id=sig}{td}{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}watermark{span}{span}\(data, image){span}{td}{tr}{builder-show}{tr:id=prs}{td}*Parameters*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_prs|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_Number_Number_Boolean_prs|trigger=none|div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} image -- the path of an image to use
\{[Number]} locationX -- the x location of -- the imagePDF
\{[NumberString]} locationYimage -- the ypath location of thean image to use
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}byte[Boolean]} isOver -- whetherthe toPDF putwith over the content
{sub-sectionadded watermak{div}{td}{tr}{tr:id=retsam}{td}*ReturnsSample*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_ret|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_Number_Number_Boolean_ret|trigger=none|class=sIndent}byte[] -- the PDF with added watermak{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:div:class=sIndent}{code:language=javascript}
// Add an image as a watermark on every page, or the pages specified as a parameter.
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var image = plugins.file.showFileOpenDialog();
	modifiedPdf = elements.customer_id.watermark(data, image);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=watermark-byteArray_String_Number_Number_Boolean_see|trigger=none}{sub-sectiontr:id=name}{divtd}h6.watermark{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=linksig}{td}*External links*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_Number_Number_Boolean_link|trigger=none}{sub-section}{div{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}watermark{span}{span}\(data, image, locationX, locationY, isOver){span}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_sam|trigger=button|text=}{sub-section}:id=prs}{td}*Parameters*\\{div:class=sIndent}{sub-section:watermark-byteArray_String_Number_Number_Boolean_sam|trigger=none}{code:language=javascript}
// Add an image as a watermark on every page, or the pages specified as a parameter.
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var image = plugins.file.showFileOpenDialog();
	modifiedPdf = elements.customer_id.watermark(data, image);
}
{code}{sub-section}\{byte[]} data -- the PDF
\{[String]} image -- the path of an image to use
\{[Number]} locationX -- the x location of the image
\{[Number]} locationY -- the y location of the image
\{[Boolean]} isOver -- whether to put over the content
{div}{td}{tr}{tr:classid=lastDetailRowret}{td}{td}{tr}{tbody}{tbody:id=watermark-byteArray_String_Number_Number_Boolean_StringArray|class=node}{tr:id=name}{td}h6.watermark{td}{tr}{tr:id=sig}{td}{span:style=float: left; margin-right: 5px;}byte[]{span}{span:id=iets|style=float: left; font-weight: bold;}watermark{span}{span:id=iets|style=float: left;}\(data, image, locationX, locationY, isOver, pages){span}{td}{tr}{builder-show:permission=edit}{tr:id=des}{td}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_des|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_des|trigger=none|class=sIndent}Replace with description{sub-section}{td}{tr}{builder-show}{builder-show:permission=edit}{tr:id=snc}{td}*Since*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_snc|trigger=button|text=}{sub-section}{sub-section:*Returns*\\{div:class=sIndent}byte[] -- the PDF with added watermak{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
// Add an image as a watermark on every page, or the pages specified as a parameter.
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var image = plugins.file.showFileOpenDialog();
	modifiedPdf = elements.customer_id.watermark(data, image);
}
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=watermark-byteArray_String_Number_Number_Boolean_StringArray_snc|trigger=none|class=sIndent} Replace with version info{sub-section}}{tr:id=name}{td}h6.watermark{td}{tr}{builder-show}{tr:id=prssig}{td}*Parameters*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_prs|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_prs|trigger=none|{span:style=margin-right: 5px;}byte[]{span}{span:style=font-weight: bold;}watermark{span}{span}\(data, image, locationX, locationY, isOver, pages){span}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{byte[]} data -- the PDF
\{[String]} image -- the path of an image to use
\{[Number]} locationX -- the x location of the image
\{[Number]} locationY -- the y location of the image
\{[Boolean]} isOver -- whether to put over the content
\{[String]\[]} pages -- an array of pages where to apply the watermark
{sub-section}{td}{tr}{tr:id=ret}{td}*Returns*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_ret|trigger=button|text=}{sub-section}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_ret|trigger=none|class=sIndent}byte[] -- the PDF with added watermak{sub-section}{td}{tr}{builder-show:permission=edit}{tr:id=see}{td}*Also see*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_see|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_see|trigger=none}{sub-section}{div}{td}{tr}{builder-show}{builder-show:permission=editthe image
\{[Boolean]} isOver -- whether to put over the content
\{[String]\[]} pages -- an array of pages where to apply the watermark
{div}{td}{tr}{tr:id=linkret}{td}*External linksReturns*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_link|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_link|trigger=none}{sub-section}byte[] -- the PDF with added watermak{div}{td}{tr}{builder-show}{tr:id=sam}{td}*Sample*\\{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_sam|trigger=button|text=}{sub-section}{div:class=sIndent}{sub-section:watermark-byteArray_String_Number_Number_Boolean_StringArray_sam|trigger=none}{code:language=javascript}
// Add an image as a watermark on every page, or the pages specified as a parameter.
var pdf = plugins.file.showFileOpenDialog();
if (pdf) {
	var data = plugins.file.readFile(pdf);
	var image = plugins.file.showFileOpenDialog();
	modifiedPdf = elements.customer_id.watermark(data, image);
}
{code}{sub-section}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table}