FAQ
1)
How can I use my own fonts?
2) How can I change the font size and the width of the columns?
3) How can I change the layout of the download links in 'My Account'?
4) I'm using Ultimate SEO URLs. Is pdf Invoice 3 working with it?
5) I can't find the answer to my question here?
1) How can I use my own fonts?
The pdf invoice includes various fonts in the directory (includes/pdf/font).
If one wishes to use other fonts, they first have to be converted according to the following instructions (tested on Windows Vista, but also works with Windows XP or Windows 2000):
1)
Download the toool ufpdf from the following link:
http://www.webchills.at/zen/ufpdf.zip
2)
Unzip into any order on the hard drive; best is:
C:\ufpdf
3)
The font which should be converted HAS TO exist as a True Type font (.ttf)
In this example we will convert Myriad, so the file myriad.ttf is required (e.g. from the directory C:\Windows\Fonts)
4)
Copy myriad.ttf into C:\ufpdf\font
5)
Open command prompt and change to C:\ufpdf\tools
6)
Enter the following command:
ttf2ufm -a -F ..\font\myriad.ttf
After confirming with 'enter', an advice of this type should apppear:
7)
Afterwards there are 3 additional files in the folder C:\ufpdf\font:
myriad.afm
myriad.t1a
myriad.ufm
We now need these three files for the next step.
8)
Create a file with the following content in a text editor:
<?php
error_reporting(E_ALL);
require_once("makefontuni.php");
MakeFont("myriad.ttf","myriad.ufm");
?>
Save the file as make.php
9)
Create a directory on the server, e.g. font. It can be any directory, it has nothing to do with Zen Cart.
Now upload the file make.php to this directory.
There is a file makefontuni.php in the folder C:\ufpdf\tools.
Now upload this makefontuni.php into the directory font tool.
Now also upload all the other Myriad font files from C:\ufpdf\font into this directory,i.e.:
myriad.ttf
myriad.afm
myriad.t1a
myriad.ufm
10)
Call up http://www.mydomain.com/font/make.php in your browser.
Now the 3 files which are needed for the pdf invoice are in the directory 'font':
myriad.php
myriad.z
myriad.ctg.z
11)
Now upload these three files into the following directory in Zen Cart:
includes/pdf/font
12)
In order to activate the font Myriad in the pdf invoice, now change Dejavusanscondensed to Myriad in 'configuration > pdfinvoice3 > fonts for invoices and articles' in Zen Cart Admin.
A further font can be converted and activated in the pdf invoice using the same procedure. To do this, simply change the name of the font in make.php. If, for example, verdana.ttf should be converted, make.php should look like this:
<?php
error_reporting(E_ALL);
require_once("makefontuni.php");
MakeFont("verdana.ttf","verdana.ufm");
?>
Further information about the ufpdf tool is available at:
http://acko.net/node/56
2) How can I change the font size and the width of the columns?
Generally, all settings should be made in Zen Cart Admin under configuration > pdf invoice 3. If the options offered here are not sufficient, changes can additionally be made in the following file:
includes/pdf/rl_invoice3_def.php
Various templates are defined in this configuration file. In the standard settings under configuration > pdf invoice 3 > template for articles and totals table, the following settings are active:
amazon|amazon_templ|total_col_1|total_opt_1
If something should be changed here, only the respective section in rl_invoice3_def.php is relevant::
$colsP['amazon'] = array(
'subtotalI' => '...',
'subtotalE' => '...',
'qty' => TABLE_HEADING_QTY,
'model' => TABLE_HEADING_PRODUCTS_MODEL,
'name' => TABLE_HEADING_PRODUCTS,
'singleE' => TABLE_HEADING_PRICE_EXCLUDING_TAX_AMAZON,
'tax' => TABLE_HEADING_TAX,
'sumE' => TABLE_HEADING_TOTAL_EXCLUDING_TAX_AMAZON,
);
$optionsP['amazon_templ'] = array("subtotal"=>'subtotalE',
"paperOriantation"=>"P",
"fontSize" => 8,
'showHeadings' => 1,
'shaded' => 1,
'xPos' => 'left',
'xOrientation' => 'right',
'width' => $realPW-35,
'cols' => array(
'subtotalI' => array('justification' => 'R', "width" => 0),
'subtotalE' => array('justification' => 'R', "width" => 0),
'qty' => array("justification" => "L", "width" => 15),
'model' => array("justification" => "L", "width" => 25),
'name' => array('justification' => 'L', "width" => 75),
'singleE' => array('justification' => 'R', "width" => 25),
'tax' => array("justification" => "R", "width" => 15),
'sumE' => array('justification' => 'R', "width" => 25),
)
);
Here one could, for example, set the font size to 7 instead of 8 to make the writing smaller.
Or change the width of the individual columns under width.
3) How can I change the layout of the download links in 'My Account
Find the settings in the following stylesheet:
includes/templates/YOURTEMPLATE/stylesheet_rl_invoice3.css
Modify color/background/links as you wish or create new classes for them.
4) I'm using Ultimate SEO URL. Is pdf Invoice 3 working with it?
Yes, but Ultimate SEO URLs has not to rewrite all sites. Otherwise downloading the pdf invoice from 'My Account' will fail.
In Configuration > Ultimate SEO URLs you have to enter manually the sites you wish to be rewritten, this settings should not be empty. E.g:index, product_info, products_new, products_all, featured_products, specials, agb, reviews, site_map
5) I can't find an answer to my question here?
Then have a look at this:
http://www.zen-cart.at/zcvb/forum