Print

MergeFilesToPDF

This function merges files from given fields to one pdf file and put it in given field with given name. Source files can be PDF files or Office files that can be converted to PDF (Word, Excel).

Syntax

MergeFilesToPDF(destinationField, destinationFileName, sourceField1, sourceField2,... );

Function arguments

  • destinationField – (String) Name of the field in which merged document will be placed, field have to be of Document type
  • destinationFileName – (String) Name of the merged file
  • sourceField1 – (String) Name or value of the document field with first file to be merged. To merge files from table name have to be pass in tableName>fieldName format
  • sourceField2, sourceField3… – (String) [Optional] Name or value of the document fields with second and further files to be merged.

Return value

This function returns Decimal.
Returns true if merge was succesfull, otherwise returns false.

Examples

Example 1:
This will merge files from Aggrement_draft and Aggrement_appendix fields to one pdf attachment and put it into Aggrement field with name Aggrement_final.pdf.

if (MergeFilesToPDF("Aggrement","Aggrement_final.pdf",[Aggrement_draft], [Aggrement_appendix])) { }

Example 2:
This will merge files from Document field in Files table to one pdf attachment and put it into Aggrement field with name Aggrement_final.pdf.

if (ConvertFileToPDF("Aggrement","Aggrement_final.pdf","Files>Document")) { }
Czy artykuł był pomocny?
5 na 5 gwiazdek

1 rating

5 Stars 100%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
How Can We Improve This Article?