PHP : Creating PDF

| No Comments | No TrackBacks

To create PDF file by PHP, you need some basic information. I record it here.

Page Sizes in PostScript Points
Paper Size - Page Width - Page Height
Letter - 612 - 792
Legal - 612 - 1008
A0 - 2380 - 3368
A1 - 1684 - 2380
A2 - 1190 - 1684
A3 - 842 - 1190
A4 - 595 - 842
A5 - 421 - 595
A6 - 297 - 421
It will be used, when I begin a page as below:

pdf_begin_page ($pdf, $width, $heifht);

Built-in PDF Fonts
courier
Courier-Bold
Courier-Bold Oblique
Courier-Oblique
Helvetica
Helvetica-Bold
Helvetica-Bold Oblique
Helvetica-Oblique
Symbol
Tuimes-Bold
Times-Bold Italic
Times-Italic
Times-Roman
Zapf Dingbats

And Font Encodings
Encoding : Description
winansi : Windows
macroman : Mac Roman (Macintosh default)
edcdic : EBCDIC, used on IBM AS/400 and S/390 systems
builtin : Coding built into the font itself
host : System-specific coding:macroman on the Mac, ebcdic on EBEDIC-based systems, and winansi on all others.

$font = pdf_findfont ($pdf, $font_name, $encoding);

Text Rendering
Option : Value
Fill : 0
Outline : 1
fill and Outline : 2
Invisible : 3

pdf_set_value ($pdf, "textrendering", 2)

Related Articles

No TrackBacks

TrackBack URL: http://www.yinfor.com/mtcgi/mt-t-1202.cgi/1400

Leave a comment

About this Entry

This page contains a single entry by David Yin published on December 20, 2006 4:32 PM.

SR1520NX video error after Windows Update December was the previous entry in this blog.

Math worksheet for my Daughters is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

OpenID accepted here Learn more about OpenID
Powered by Movable Type 4.23-en