Case:
We cooperate with our customers under contract and often send invoices to them. We have an A4-sized sales invoice image that I want to overlay with a text file to produce a finalized invoice I can send to a customer. The background PDF template stays the same, but we need to make unique text contents for each order. It would be good if we could specify a merge PDF with TXT task for each folder – so we could send text invoices to one folder, statements to another, quotes to another, etc. Is it possible to automate this process with FolderMill?
Solution:
FolderMill is able to render your text files and overlay it upon a PDF file. With our application you can merge a text file with a template PDF file as a background image. You can make this process automatic on a regular basis.
Example:
You have an invoice template in image or PDF format:
If your sales invoice template is an image file (JPG, PNG, BMP, PSD or any other file type supported by FolderMill), convert it into PDF first: use the Convert to PDF Action in the action set of a Hot Folder.
Sales invoice data for a specific order may be in plain text (.TXT) format and look like this:
Apply TXT over PDF step-by-step
- Download our add-on MPDFHelper utility here:
download.fcoder.com/tools/MPDFHelper.zip - Extract the .zip file to any folder, e.g.
C:\FolderMill Data\tools\pdftxtapply - Place your template PDF to FolderMill’s tools folder:
C:\FolderMill Data\tools\[TemplateFilename].pdf - Launch FolderMill, create a new Hot Folder;
- Create new Run custom application Action;
- Enter path to MPDFHelper.exe in Path to application or script file field;C:\FolderMill Data\tools\pdftxtapply\MPDFHelper.exeEnter the following command line in the Command line parameters field:-verb textfile2pdfletterhead -stxt "{srcfilefullpath}" -slh "C:\FolderMill Data\tools\[TemplateFilename].pdf" -outdir "C:\FolderMill Data\Hot Folders\1\Output" -fontname "Courier New" -fontsize 7 -linespacing 1.74 -leftmargin 0.02 -topmargin 0.125Where you can change values for:
-slh - path to the background PDF titled with [TemplateFilename].pdf (see above, p. 3)
-outdir - output folder path
-fontname - font type
-fontsize - font size
-linespacing - interline spacing
-leftmargin, -topmargin - text placement over the background PDF - Enable the “Run in hidden mode” checkbox;
- Click OK and Apply changes
- Run FolderMill Processor by pressing the Start button.
Now every time you place a new TXT file into this Hot Folder’s Incoming folder you will get themerged PDF+TXT file in the Output (-outdir) folder.
Congratulations! With the text applied over PDF, you get an invoice ready to be sent to your customer:
If you have any questions or difficulty using this feature, please feel free to contact us. If this guide doesn’t work for you for some reason, we will find an alternative solution!