Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
id | addMetaData-byteArray_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add metadata to the PDF, like Author |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {Object} metaData - a JavaScript object (Scriptable) that contains the metadata as property/value pairs |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with metaData added |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | combinePDFDocuments-ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
combinePDFDocuments |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(pdf_docs_bytearrays) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Combine multiple PDF docs into one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object[]} pdf_docs_bytearrays - the array of documents to combine |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| pdf_blob_column = combinePDFDocuments(new Array(pdf_blob1,pdf_blob2,pdf_blob3)); |
|
|
|
|
Table Body (tbody) |
---|
id | combineProtectedPDFDocuments-ObjectArray_ObjectArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
combineProtectedPDFDocuments |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| combineProtectedPDFDocuments |
Span |
---|
(pdf_docs_bytearrays, pdf_docs_passwords) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Combine multiple protected PDF docs into one. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {Object[]} pdf_docs_bytearrays - the array of documents to combine {Object[]} pdf_docs_passwords - an array of passwords to use |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| pdf_blob_column = combineProtectedPDFDocuments(new Array(pdf_blob1,pdf_blob2,pdf_blob3), new Array(pdf_blob1_pass,pdf_blob2_pass,pdf_blob3_pass)); |
|
|
|
|
Table Body (tbody) |
---|
id | convertPDFFormToPDFDocument-byteArray_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| convertPDFFormToPDFDocument |
Span |
---|
(pdf_form, field_values) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Convert a PDF form to a PDF document. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} pdf_form - the PDF Form to convert {Object} field_values - the values to use |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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)
} |
|
|
|
|
Table Body (tbody) |
---|
id | convertProtectedPDFFormToPDFDocument-byteArray_String_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
| convertProtectedPDFFormToPDFDocument |
Span |
---|
(pdf_form, pdf_password, field_values) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Convert a protected PDF form to a PDF document. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} pdf_form - the PDF Form to convert {String} pdf_password - the password to use {Object} field_values - the field values to use |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| 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)
} |
|
|
|
|
Table Body (tbody) |
---|
id | encrypt-byteArray_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, ownerPassword) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add password protection and security options to the PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {String} ownerPassword - the owner password |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the encrypted PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | encrypt-byteArray_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, ownerPassword, userPassword) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add password protection and security options to the PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {String} ownerPassword - the owner password {String} userPassword - the user password |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the encrypted PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add password protection and security options to the PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the encrypted PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add password protection and security options to the PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the encrypted PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | encrypt-byteArray_String_String_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Boolean_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, ownerPassword, userPassword, allowAssembly, allowCopy, allowDegradedPrinting, allowFillIn, allowModifyAnnotations, allowModifyContents, allowPrinting, allowScreenreaders, is128bit, metaData) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add password protection and security options to the PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the encrypted PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Ends a previously started meta print job. For meta print jobs that were stored in memory, not in a file on disk, also returns the content of the generated PDF document. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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() |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getPDFPrinter |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns a PDF printer that can be used in print calls. Returns the last started meta print job. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //to print current record without printdialog to pdf file in temp dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter()); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getPDFPrinter |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns a PDF printer that can be used in print calls. The PDF printer that generates a PDF into the specified file is returned. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} filename - the file name |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //to print current record without printdialog to pdf file in temp dir.
controller.print(true,false,plugins.pdf_output.getPDFPrinter('c:/temp/out.pdf')); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getPagesPrinted |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns the number of pages printed by the last print call done in the context of a meta print job. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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() |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
getTotalPagesPrinted |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns the total number of pages printed in the context of a meta print job. Call this method before ending the meta print job. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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() |
|
|
|
|
Table Body (tbody) |
---|
id | insertFontDirectory-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
insertFontDirectory |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add a directory that should be searched for fonts. Call this only in the context of an active meta print job. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} path - the path to use |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //Insert font directories for font embedding.
//You must create an MetaPrintJob before using it.
plugins.pdf_output.insertFontDirectory('c:/Windows/Fonts');
plugins.pdf_output.insertFontDirectory('c:/WinNT/Fonts');
plugins.pdf_output.insertFontDirectory('/Library/Fonts'); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
numberPages |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add pages numbers to a PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with numbered pages |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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');
} |
|
|
|
|
Table Body (tbody) |
---|
id | numberPages-byteArray_Number_Number_Number_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
numberPages |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, fontSize, locationX, locationY, font, hexColor) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add pages numbers to a PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with numbered pages |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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');
} |
|
|
|
|
Table Body (tbody) |
---|
id | overlay-byteArray_byteArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add some PDF based content over a PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {byte[]} forOverlay - a PDF to use as overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 );
}
} |
|
|
|
|
Table Body (tbody) |
---|
id | overlay-byteArray_byteArray_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, forOverlay, isOver) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add some PDF based content over a PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {byte[]} forOverlay - a PDF to use as overlay {Boolean} isOver - whether the overlay will be put over the content |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 );
}
} |
|
|
|
|
Table Body (tbody) |
---|
id | overlay-byteArray_byteArray_Boolean_StringArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, forOverlay, isOver, pages) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add some PDF based content over a PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 );
}
} |
|
|
|
|
Table Body (tbody) |
---|
id | overlay-byteArray_byteArray_StringArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, forOverlay, pages) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add some PDF based content over a PDF |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {byte[]} forOverlay - a PDF to use as overlay {String[]} pages - an array of page numbers to put the overlay on |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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 );
}
} |
|
|
|
|
Table Body (tbody) |
---|
id | overlayText-byteArray_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
overlayText |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add text over every page at a 45 degree angle |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {String} text - the text to use for the overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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');
} |
|
|
|
|
Table Body (tbody) |
---|
id | overlayText-byteArray_String_Number_Number_Boolean_Number_String_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
overlayText |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, text, locationX, locationY, isOver, fontSize, font, hexColor) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add text over every page at a 45 degree angle |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added overlay |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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');
} |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Used for printing multiple things into the same PDF document. Starts a meta print job and all print calls made before ending the meta print job will be done into the same PDF document. The PDF document is stored in memory and can be retrieved when ending the meta print job and can be saved, for example, into a dataprovider. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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() |
|
|
|
|
Table Body (tbody) |
---|
id | startMetaPrintJob-String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Used for printing multiple things into the same PDF document. Starts a meta print job and all print calls made before ending the meta print job will be done into the same PDF document. The PDF document is generated in a File specified by the filename. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {String} filename - the file name |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| //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() |
|
|
|
|
Table Body (tbody) |
---|
id | watermark-byteArray_String |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add an image as a watermark on every page, or the pages specified as a parameter |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {byte[]} data - the PDF {String} image - the path of an image to use |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added watermak |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | watermark-byteArray_String_Number_Number_Boolean |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, image, locationX, locationY, isOver) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add an image as a watermark on every page, or the pages specified as a parameter |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added watermak |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
Table Body (tbody) |
---|
id | watermark-byteArray_String_Number_Number_Boolean_StringArray |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(data, image, locationX, locationY, isOver, pages) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Add an image as a watermark on every page, or the pages specified as a parameter |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters Div |
---|
| {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 |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Div |
---|
| byte[] - the PDF with added watermak |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| // 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);
} |
|
|
|
|
|