PDFApi
Version 9 (Schorsch Leciejewski, 06.03.2008 05:40 pm)
| 1 | 9 | Schorsch Leciejewski | h1(title). PDF API |
|---|---|---|---|
| 2 | 1 | ||
| 3 | 1 | ||
| 4 | 7 | Schorsch Leciejewski | The SalesKing uses the pdfLib for creating PDF documents. You can customize any generated pdf files (f.ex. Invoice) by uploading PDF templates into the system. |
| 5 | 1 | ||
| 6 | 7 | Schorsch Leciejewski | Customizing the pdf templates is not really difficult. Despite your will to read the docs and spending some time trying, you need Adobe´s Acrobat Writer and a Acrobat Writer plugin to edit the data placeholders: the "Block plugin":http://www.pdflib.com/de/download/pdflib-familie/block-plugin/ |
| 7 | 1 | ||
| 8 | 8 | Schorsch Leciejewski | h1. Contents |
| 9 | 1 | ||
| 10 | 7 | Schorsch Leciejewski | {{toc}} |
| 11 | 1 | ||
| 12 | 8 | Schorsch Leciejewski | h1. Audience |
| 13 | 1 | ||
| 14 | 7 | Schorsch Leciejewski | This document is intended for SalesKing users which want to customize the pdf templates. |
| 15 | 1 | ||
| 16 | 7 | Schorsch Leciejewski | This help section assumes that you understand the basics of Adobe Acrobat and the pdfLib-Block plugin. Further you should have some basic knowledge of how to create a pdf file from various resources as well as some graphic design knowledge. |
| 17 | 1 | ||
| 18 | 7 | Schorsch Leciejewski | For more information about those things, see the Additional resources section at the bottom of this document. |
| 19 | 7 | Schorsch Leciejewski | |
| 20 | 7 | Schorsch Leciejewski | If you master the art of pdf customizing you definitely have a sharp knife to cut down on those ugly invoices and official documents ... layouted with word |
| 21 | 7 | Schorsch Leciejewski | |
| 22 | 7 | Schorsch Leciejewski | |
| 23 | 8 | Schorsch Leciejewski | h1. PDF Templates in General |
| 24 | 3 | Schorsch Leciejewski | |
| 25 | 3 | Schorsch Leciejewski | A pdf template can be any pdf file. There is a small set of conventions you need to follow, but first the normal steps you take in customizing: |
| 26 | 3 | Schorsch Leciejewski | |
| 27 | 3 | Schorsch Leciejewski | # make layout in photoshop / indesign / gimp / OO / Word |
| 28 | 3 | Schorsch Leciejewski | # generate a pdf |
| 29 | 3 | Schorsch Leciejewski | # get one of our default templates / or start from scratch |
| 30 | 3 | Schorsch Leciejewski | # open acrobat writer and export the blocks from the default template to your new pdf. (How too´s will follow, until then read the pdfLib Block plugin manual) |
| 31 | 4 | Schorsch Leciejewski | # customize the blocks on you new pdf (block size/text/font/position/content/..) |
| 32 | 3 | Schorsch Leciejewski | # upload the pdf into SalesKing |
| 33 | 3 | Schorsch Leciejewski | # check the output |
| 34 | 3 | Schorsch Leciejewski | |
| 35 | 8 | Schorsch Leciejewski | h2. Conventions |
| 36 | 3 | Schorsch Leciejewski | |
| 37 | 4 | Schorsch Leciejewski | * all fonts used in blocks must be present on the system generating the output pdf (our server) |
| 38 | 3 | Schorsch Leciejewski | * Blocknames must match a special syntax (also see [[Placeholders]]) |
| 39 | 3 | Schorsch Leciejewski | * Blocks holding listings (invoice Items) have special custom blockfields |
| 40 | 1 | * Invoices MUST have first and second page for multipage invoices |
|
| 41 | 1 | ||
| 42 | 8 | Schorsch Leciejewski | h1. Blocks |
| 43 | 6 | Schorsch Leciejewski | |
| 44 | 6 | Schorsch Leciejewski | A Block is placeholder which gets substituted with data/text from the system. |
| 45 | 6 | Schorsch Leciejewski | It is not required to have a standard set of block in a template. There are a set of special blocks which give you enhanced control (invoice items table) via custom fields. Some of these options can also be made inside the user interface. |
| 46 | 6 | Schorsch Leciejewski | If those fields are present but do not have their custom options set, we first try to use settings from the SalesKing user settings. If they are blank too, we take a set of default options from our system. |
| 47 | 6 | Schorsch Leciejewski | |
| 48 | 6 | Schorsch Leciejewski | It is important to know this way of options detection, especially when you are wondering why something comes out like it does. |
| 49 | 6 | Schorsch Leciejewski | |
| 50 | 8 | Schorsch Leciejewski | h2. Block name |
| 51 | 6 | Schorsch Leciejewski | |
| 52 | 6 | Schorsch Leciejewski | The block name is the most important part which determines the matching data field from the application. |
| 53 | 6 | Schorsch Leciejewski | A block further carries information about how to output the data. |
| 54 | 6 | Schorsch Leciejewski | |
| 55 | 6 | Schorsch Leciejewski | |
| 56 | 8 | Schorsch Leciejewski | h2. Block position |
| 57 | 6 | Schorsch Leciejewski | |
| 58 | 6 | Schorsch Leciejewski | The data/text is rendered at the position of the block. Depending on the block properties (f.ex. type:textline, textflow, image, align) the actual placement of the text varies. |
| 59 | 6 | Schorsch Leciejewski | |
| 60 | 8 | Schorsch Leciejewski | h2. Block properties |
| 61 | 6 | Schorsch Leciejewski | |
| 62 | 6 | Schorsch Leciejewski | The deep details of all block properties can be studied in the pdfLib API and the block manual. |
| 63 | 6 | Schorsch Leciejewski | Therefore here just a list of options you are likly to use frequently: |
| 64 | 6 | Schorsch Leciejewski | |
| 65 | 6 | Schorsch Leciejewski | * Font + Fontsize - be aware that the font must be present on our system! |
| 66 | 1 | * textflow - mutiline-text blocks must use this option which reveals more settings for the text flow |
|
| 67 | 1 | * alignment - text alignment in texflow boxes |
|
| 68 | 1 | * custom properties + values defined by the SalesKing - documented in detail |
|
| 69 | 1 | ||
| 70 | 8 | Schorsch Leciejewski | h1. [[PDFApi Invoice Templates]] |
| 71 | 7 | Schorsch Leciejewski | |
| 72 | 8 | Schorsch Leciejewski | h1. Additional Resources |
| 73 | 7 | Schorsch Leciejewski | |
| 74 | 7 | Schorsch Leciejewski | * "pdfLib Block plugin for Acrobat Writer":http://www.pdflib.com/de/download/pdflib-familie/block-plugin/ |
| 75 | 7 | Schorsch Leciejewski | * "German pdfLib Manual":http://www.pdflib.com/de/developer/technische-dokumente/handbuecher/ |