Printfil Manual - How to merge logos and other background image files


Google translation:

 Since 1996, the Windows printing solution for legacy applications !
 

Chapter 6 - How to merge logos and other background image files

PRINTFIL can include logos and other graphical images to your print jobs. This feature is particularly useful to obtain jobs on "Letterheads" or on standard forms ("Invoices", "Order modules" etc.)

This files can be previously created using any graphical editor, (Paint Shop Pro, CorelDraw etc.), then you can include them in your print jobs using 2 methods:

  1. Using the 4th line in FILENAME.CFG (see Chapter 3).
  2. Using special Control Codes inside your ascii print-job file (see Chapter 5).

In both cases you have to specify at least the name of the graphics background file to load.

You can use WMF files (Windows Meta Files), EMF files (Enhanced Meta Files) and BMP files (Bitmaps).

If the extension is not specified, WMF will be assumed.

If the path is not specified, PRINTFIL will use the path of the ASCII print-job file (see the FileName setting of PRINTFIL.INI). In this way, a UNIX or LINUX application can create the file (for example) /usr/share/printfil/filexx.txt and write only "filexx.bmp" as background image. PRINTFIL on a Windows PC will search both files in the same directory (for example F:\PRINTFIL\FILEXX.*).

If the specified BMP, WMF or EMF file is not found, no background will be included.

WMF and EMF files are smaller then BMP files, but BMP files are more versatile. We suggest you use BMP files saved with RLE compression to reduce their size.

While WMF and EMF files will be enlarged to fit the entire page, BMP files will normally be enlarged to "printable" dimensions (i.e. entire page minus the margins previously set). In addition, only BMP files can be placed anywhere on the sheet by providing parameters after the file name separated by "pipe" ("|" , ascii 124) , according with the following syntax:

FileName | Top | Left | Width | Height | FromPage | ToPage

The first 4 additional parameters will be in the same units-of-measure set for the page margins.

Top and Left are for placing the Top-Left corner of the Bitmap. If they are positive, the margins (are set in the configuration dialog) will be considered, else (if they are negative) the bitmap will be placed taking care only of the sheet's dimensions.

For example, if you set the first two parameters to 2.5 | 1.2 and the margins are set to 0.5 Cm. on each side of the sheet, the bitmap will be placed at 3 Cm. from the top margin of the sheet and 1.7 Cm. from the left margin, while if they are set to -2.5 | -1.2 , the bitmap will be placed at 2.5 Cm. from the top margin of the sheet and 1.2 Cm. from the left one, independently by the margins set in the configuration dialog.

The first case is useful, for example, to ensure an invoice will be always printed inside the "cells", because either the text or the bitmap will be redimensioned taking care of the margins. The second case can be useful to place a bitmap outside the margins: for example to add a logo at the top of a page which normally would be entirely filled with the text, without changing the source application.

Width and Height have a little more sophisticated behavior:

  1. If the value is positive, the bitmap will have that dimension.
  2. If the value is zero, the bitmap will be expanded to the margins of the sheet.
  3. If the value is -1, the dimension will be automatically calculated to maintain the original proportions. For example, if the bitmap is square and you set its height to 7 and its length to -1, the resulting length will be 7 also.
  4. Every value under -1 will have the effect of using the original dimensions of the bitmap in pixels. WARNING: use this technique with care because in using it, the resulting dimensions (in Cm. Or In.) on the sheet will depend on the printer resolution set in the Windows driver.

FromPage and ToPage tells Printfil on which page(s) the bitmap has to be printed. They can be set to the same value (for example 1|1 = only the first page on the print job). If they are not set (or they are set to zero), the bitmap will be placed on all the pages.

The entire sequence can be repeated different times on the same row to specify different background bitmaps which can be printed on different pages and positions.

EXAMPLES:

backgr.bmp|0|0|0|0 Sets only the name of the BMP file. The bitmap will be expanded to fit the entire "printable" sheet.
backgr.bmp|2|2|0|0 The bitmap will be placed 2 Cm. from the top margin of the sheet and 2 from the left margin (plus the margins) and will be expanded to the remaining area on the sheet.
backgr.bmp|2|2|0|-1 The bitmap will be placed as above, will be enlarged to the right margin of the sheet, and the height will be calculated to maintain the original proportions.
backgr.bmp|0|0|-1|5 The bitmap will be placed at the top-left corner, its height will be 5 Cm. and it will be as wide as necessary to maintain the original proportions.
backgr.bmp|7|3|-2|-2 The bitmap will be placed 7 Cm. from the top margin, 3 Cm. from the left margin and will be printed AS IS.
backgr.bmp|-2|-2 The bitmap will be placed 2 Cm. from the top margin of the sheet and 2 from the left margin (independently by the margins set into the Printfil's configuration dialog) and will be expanded to the remaining printable area on the sheet.
header.bmp|0|0|-1|1|1|999999|footer.bmp|22|0|-1|1 Allows you to place 2 bitmaps on every page (the first one on pages from 1 to 999999 and the second one from 0 to 0, which is the same thing)
faxcover.bmp|0|0|0|0|1|1|invoice.bmp|0|0|0|0|2 Allows you to place faxcover.bmp only on the 1st page (enlarged to the margins) and invoice.bmp on all the other pages
invoice.bmp|3|0|20|26|1|1|invoice.bmp|0|0|20|26|2 Invoice.bmp will be placed on all the pages, but shifted 3 Cm. up starting from the 2nd page
   
   
language
EnglishItalianoSpanish
GermanFrenchDutch
CzechRussianBrazilian
PortugueseGreekPolish
SlovenianMacedonianHebrew
CatalanSwedishSerbian
IcelandicRomanianDanish
HungarianNorwegianFinnish
ArabicTurkishUrdu
 
see also...
File In Mail: Automatically send out files via e-mail  
 
 

Copyright © 2010 aSwIt s.r.l., Italy. VAT ID: IT 01305590299 | Printing, Mail, utilities for MS-DOS, Linux and legacy programs