
     <b><font color=red>PDF Specification</font> - <i>Brief Information (%PDF-1.2 for Acrobat Reader 3.x)</i></b>










                                    -written- by 



                                      <font color=blue>T.K.Cham</font>

                             (e-mail:<font color=blue>gongxi@tm.net.my</font>)





                       <font color=blue>"<b><font color=red>PasPDF</font></b>" Reference Manual</font> - Book #2 of 2

                                version <font color=red>1.0</font> revision <font color=red>1</font>

                                       <font color=red>04.jan.99</font>





 
                                        <b><font color=red>PasPDF</font></b>
                            <font color=blue>Native PDF Creation for Delphi</font>

           Copyright [c] 1998-99 <b><font color=blue>VISION Software (M) Sdn. Bhd.</font></b> (<font color=red>393369-T</font>)

                                  -:<font color=red>Correspondence</font>:-
                    <b>11, Lorong Tan Sai Gin 4, Taman Tan Sai Gin,
                14000 BUKIT MERTAJAM, S.P.T. Pulau Pinang. Malaysia.</b>

                        <font color=red>---------- Malaysia Boleh ! ----------</font>








*note* <i>please note that the information mostly extracted from
       </i><b>PDFSPEC.PDF v1.1 <i>27.nov.96</i></b>

<!!PAGEBREAK-->

                           <b><font color=blue>PDF Architectural Limits</font></b>
--------------------------------------------------------------------------------
Quantity          Limit       Explanation
------------- --------------  --------------------------------------------------

<font color=blue>Integer</font>        2,147,483,647  <i>Largest positive value, 2 (31) - 1</i>
              -2,147,483,648  <i>Largest negative value, -2 (31)</i>

<font color=blue>Real</font>              + - 32,767  <i>Approximate range of values</i>
              + - 1 / 65,536  <i>Approximate smallest non-zero value</i>
                           5  <i>Approximate number of decimal digits of 
                                precision in fractioinal part</i>

<font color=blue>Array</font>                 65,535  Maximum number of elements in an array

<font color=blue>Dictionary</font>            65,535  <i>Maximum number of key-value pairs in 
                                a dictionary</i>

<font color=blue>String</font>                65,535  <i>Maximum number of characters in a string</i>

<font color=blue>Name</font>                     127  <i>Maximum number of characters in a name</i>

<font color=blue>Indirect Object</font>      250,000  <i>Maximum number of indirect objects in a PDF file</i>

--------------------------------------------------------------------------------

* The <b><font color=blue>size of PDF file</font></b> is limited to 10 (10) bytes (approximately <b>10GB</b>)

* <b><font color=blue>Thumbnails</font></b>
    .. no larger than <b>106x106 samples</b> : 1/8 scale for Paper Size of Letter / A4 
    .. Color Space : <b>DeviceGray</b> / <b>Direct</b> / <b>Indexed DeviceRGB</b>

* <b><font color=blue>Paper Size</font></b>
    .. minimum : 72x72 units (<b>1x1 inch</b>)
    .. maximum : 3240x3240 units (<b>45x45 inches</b>)

* <b><font color=blue>Zoom Factor of a view</font></b> : <b>12%</b> to <b>800%</b>

* <b><font color=blue>PDF file format</font></b>
    .. Top of File - <b>%PDF-1.2</b>
    .. End of File - <b>%%EOF</b>

<!!PAGEBREAK-->

<b><font color=blue>Types of PDF's Page Description Object</font></b>
--------------------------------------------------------------------------------
* <font color=blue>Path Object</font>
  .. <b>Path Segment</b> operators
  .. <b>Path Clipping</b> operators
* <font color=blue>Text Object</font> ( <b>BT</b> .... <b>ET</b> )
  .. <b>General Graphics State</b> operators
  .. <b>Color</b> operators
  .. <b>Text State</b> operators
  .. <b>Text String (Painting)</b> operators
  .. <b>Text Positioning</b> operators
* <font color=blue>In-line Image Object</font> ( <b>BI</b> .... <b>EI</b> )
  .. <b>ID</b>
* <font color=blue>External Object</font> ( immediate .... <b>Do</b> / <b>PS</b> )
  .. none

<b><font color=blue>Operators of Page Description</font></b>
--------------------------------------------------------------------------------
<font color=red>GG</font> General Graphics State       <b><font color=blue>d gs i j J M w</font></b>
<font color=red>SG</font> Special Graphics State       <b><font color=blue>q Q cm</font></b>
<font color=red>C </font> Color                        <b><font color=blue>g G k K rg RG sc SC scn SCN cs CS</font></b>
<font color=red>TS</font> Text State                   <b><font color=blue>TC Tf TL Tr Ts Tw Tz</font></b>
<font color=red>TP</font> Text String (Painting)       <b><font color=blue>Tj TJ ' "</font></b>
<font color=red>PS</font> Path Segment                 <b><font color=blue>Td TD Tm T*</font></b>
<font color=red>PP</font> Path Painting                <b><font color=blue>c hl m re v y</font></b>
<font color=red>PC</font> Path Clipping                <b><font color=blue>f F f* n s S b b* B B*</font></b>
<font color=red>MC</font> Marked Content               <b><font color=blue>BMC BDC EMC MP DP</font></b>

<b><font color=blue>Brief Information about operators of PDF's Page Description</font></b>
--------------------------------------------------------------------------------
<b><font color=blue>T*</font></b>             Move to the start of next line
<b><font color=blue>(</font>....<font color=blue>)'</font></b>        Write Text with CRLF without other PDF commands (Writeln)
<b><font color=blue>T* (</font>....<font color=blue>) Tj</font></b>   Write Text with CRLF with other PDF commands (Writeln)
<b><font color=blue>? Tc</font></b>           Character Spacing for Horizontal Writing in unit (default=0)
<b><font color=blue>? Tw</font></b>           Word Spacing for Horizontal Writing in unit (default=0)
<b><font color=blue>? Tz</font></b>           Horizontal Scaling (default=100,e.g.10cpi->17cpi=50)
<b><font color=blue>? TL</font></b>           Leading (default=0, generally 12p text ->14.5p leading)
<b><font color=blue><<n> <<s> Tf</font></b>     Set Font Name and Size
<b><font color=blue>a b c d e f Tm</font></b> Text matrix
                 [ 1  0  0 1 x y Tm ] general translation
                 [ x  0  0 y 0 0 Tm ] Scaling
                 [ c  s -s c 0 0 Tm ] Rotation c=cos s=sin
                 [ 1 ta tb 1 0 0 Tm ] Skew ta=tan/alpha tan/beta
<b><font color=blue><<m> Tr</font></b>         Text Rendering mode (fill gray color)
               0 = Fill Text
               1 = Stroke Text (outline font)
               2 = Fill and Stroke Text (text+outline)
               3 = invisible (no fill no outline)
               4 = Fill Text and add it to the clipping path (windowed text)
               5 = Stroke Text and add it to the clipping path
               6 = Fill and Stroke Text and add it to the clipping path
               7 = Add Text to the clipping path
<b><font color=blue><<c> g</font></b>          Set Fill Color (r=g=b)
<b><font color=blue><<c> G</font></b>          Set Stroke Color (r=g=b)
<b><font color=blue><<r> <<g> <<b> rg</font></b> Set Fill Color (Font)
<b><font color=blue><<r> <<g> <<b> RG</font></b> Set Stroke Color (Font)
<!!PAGEBREAK-->
<b><font color=blue>Brief Information about operators of PDF's Page Description</font></b> (continued...)
--------------------------------------------------------------------------------
<b><font color=blue><<x> <<y> m</font></b>      move to location x,y (moveto)
<b><font color=blue><<x> <<y> l</font></b>      draw a line to location x,y (lineto)
<b><font color=blue>S</font></b>              update graphic-path immediately
<b><font color=blue>s</font></b>              update graphic-path once only
<b><font color=blue>[ ? ] ? d</font></b>      Set Dash Pattern for Graphic operators (e.g. lineto, etc.)


#end# version 1.0 revision 1 @ 04.jan.99 ...: to be continued :...