Tag Archives: pdf

  • HTML2PDF User Manual – System options

    Posted on July 24, 2012 by ext4mage

    System options

    Set up the general options, and give information to make the help section and preview function work.

    HTML2PDF User Manual –  configuration setup options

    Field description:

    • Is module active – whether or not the HTML2PDF module shall be used, when in No, the default Magento PDF’s will be used, but the preview function will still work
    • Show on customer My Account – weather or not the PDF’s shall be visible to the customers
    • Is in development mode –to test you PDF’s, see more in Development mode section of this manual
    • License code – the code you are given from ext4mage when buying this module
    • Order id for preview – used in help and preview function of the module
    • Product in order for help – used in help screen, the specified product id must be contained in the above specified order
    • Bundle product in order for help - used in help screen, the specified product id must be contained in the above specified order
    • Creditmemo number for preview – used in help and preview function, because of Magento “feature / error” this has to be the real id and not the incremental_id. In this case the number is not 100000001 but just 1, you can see this number in the address line when you view the Creditmemo in standard Magento.
     

    System options – Sales emails

    If you want to make use of the function to attach the PDF and Terms and Conditions to the different email, you go into Sales->Sales Emails

    HTML2PDF User Manual – configuration setup options sales-email

    Field description (is available for each email type):

    • Attach HTML2PDF Order PDF to mail – should the order/invoice/shipment/creditmemo PDF be sent with the sales email
    • Attach Terms and Conditions as html/txt file  – attach the Terms and Condition to the sales email, works both with HTML and plain text
     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, invoice, magento, pdf, manual

  • HTML2PDF User Manual - Overview

    Posted on July 24, 2012 by ext4mage

    Overview

    HTML2PDF has different element, which can be combined to create a complete template for a PDF print. Within these elements you can use different types of variables related to the type of print and element. The way HTML2PDF is made will make reuse very simple.

    Element description

    Following main elements exist in HTML2PDF:

    Template:
    This is the head element. In your template you setup all general settings, and also the other elements that shall be combined into the final PDF.

    Text:
    Here all text elements are held, that being header, footer and main text for all types of PDF prints. The different text elements can be used in various templates, meaning that you can have a single header and footer that can be reused in all templates. All text written in this element can contain html format, read more about this in text setup section.

    Table:
    Building the product table is done in this element. It has information about the table, such as style, width, layout and so forth. Within this element you define multiple columns with information about column header text, value, style and so forth. This table can also be reused in different templates.

    Elements relationship

    The illustration below describes the internal relationship, from the template point of view:

    HTML2PDF - Overview element in a pdf

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, print pdf, manual

  • HTML2PDF User manual - Table element setup

    Posted on July 24, 2012 by ext4mage

    Table element setup

    In this step you setup a product table. The first screen you will see, is a list of all the tables that exist, you are now able to edit one of them or make a new table from scratch.

    If you will make a new from an existing, open the old and change Title and click Save As

    General – element information

    Either way you choose the first screen you will see is the one below; here you setup the general stuff about the table in hand. HTML2PDF User manual - edit table general info

    Field description:

    • Table style – general style elements the use in whole table
    • Header style – style elements that will be added to the header of each column
    • Even product row style – style elements that will be used in even rows in the table
    • Odd product row style – style elements that will be used in odd rows in the table
     

    Using cellspacing and borders in you tables can conflict, so if the borders are missing cellspacing could be the sinner. In this case use cellpadding instead.

     

    The row style will be implemented on the <tr> object, so write you style with that in mind

     

    Table columns

    The next thing you want to setup in your table is the different column. There is no limit in the module of how many columns that you can have.

    On each column you have to decide how the different product type information shall be shown. The 4 types of product types can be handled like described in this table:

    Default Bundle Downloadable Virtual
    Do not show X X X
    Use default format X X
    Use custom format X X X X
     

    The screen for setting up the column is as below HTML2PDF User manual - edit table column

    Field description:

    • Custom style – general style elements for this column
    • Width – the width of the column in percent
    • Sort order – in which order this column shall be shown, from left to right
    • XX product format – how to show the product type, see the table above
    • Product format – the content of the column for the product, html code can be used.
    • Option format – if product has options this is the content for options, html code can be used
    • Bundle itemsgroup format – bundle product have groups of item, this field set how that should be shown, html code can be used
    • Bundle item format – the content to be shown with each product item in the bundle group, html code can be used.
     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, pdf layout, manual

  • HTML2PDF User manual - Template setup

    Posted on July 24, 2012 by ext4mage

    Template setup

    This is the master of the HTML2PDF module; here you collect the different elements into the final template used for printing the PDF.

    When you press print in the different screen in Magento, then the active template based on type and store is selected. If no templates is present for the PDF type and store the default Magento PDF layout will be chosen. Are there multiple templates which are matching, the template to be chosen random.

    First screen you will see when editing a template is the general tap, here you setup main information about the template in hand.

    HTML2PDF User manual - edit general part of template element

    Field description:

    • Type – select the type of print the template should be applied to, can be Order, Invoice, Shipment and Credit Memo.
    • Store view – Select the stores that this template shall be active for
    • Number of cross-sell items – Is the number of cross-sell items that should be collected, still only the ones defined in the cross-sell text element will be shown
    • Active from – Set an date from which this template should be used, can be empty
    • Active to – Set a date until which this template should be used, can be empty
     

    In the next tab you select the text and table elements that should be used in this templateHTML2PDF User manual - edit the text element used in template

    The last tab contains information about the general style and setup of the template in hand. HTML2PDF User manual - edit the style of the template element

    It is still possible to set a different font, font-size and color within the single text element. But not all font-types are supported.

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, pdf layout, manual

  • HTML2PDF User manual - Using variables

    Posted on July 24, 2012 by ext4mage

    Using variables

    There are a lot of variables at your disposal when making a text or table element. All HTML2PDF accessible variables are shown in the help section, but beside these all default Magento variables can also be used. The way that you indicate a variable, is by using the format shown below in code example and screen print.

    {{variable_code}}        //the format
    {{order_data_status}}    //example, will print the status of the order
    

    HTML2PDF User manual - using variables in PDF

    The variables are divided up into the types of PDF that you can create. There are a general section of variables which can be used in all types of PDF’s. HTML2PDF User manual - listing order variables in help

    And there a variables that can only be used in a specific type. There are groups of variables for invoice, shipment and credit memo, which can only be used for that specific type of PDF.HTML2PDF User manual - listing invoice variables in help

    Some variables are to be used in the product table, which is general for all types of PDF’s and all types of product. In the help screens these are under the Product tab.

    There are also variables specific for bundle product types, which include variables related to the bundle group and the single items in the bundle.
    HTML2PDF User manual - listing product bundle variables in help

    When creating a new text or table, and you need to debug. Then setup in System Configuration the specific order, invoice or product id and then see all the available variables in the help pages.

    Download the tables with variables to CSV or Excel to sort and search trough. Do this and you can easy find the exact variable you are looking for.

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, manual, variables

  • HTML2PDF User manual - Using formatting

    Posted on July 24, 2012 by ext4mage

    Using formatting

    There are some standard formatting options available in the HTML2PDF module. These formatting can be used on all variables, whether or not they are computed or single. See more about computed variables in section Using inline coding.

    The last tab in help pages, is a list of all the available formatting options. HTML2PDF User manual - listing formatting in help

    The way you use formatting is like follows for a single variable

    {{formatting variable_code}}        //the format
    {{format_price order_data_subtotal}}
      //example, will print the subtotal of order with the correct currency formatting
    

    If you have inline code the formatting of that is as follows

    ##formatting the_code##             //the format
    ##format_price {{order_data_subtotal }}-{{order_data_discount}}##
      //example, will print the subtotal minus the discount with the correct currency formatting
    
     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, manual, variables

  • HTML2PDF User manual - Using inline coding

    Posted on July 24, 2012 by ext4mage

    Using inline coding

    This is where things get very powerful and a bit complex. If you do not know PHP just a bit, then be careful about which code you type in here.

    What you can do with HTML2PDF inline code, is everything from simple math stuff to very complex PHP code. I will here give a short taste of what you can do, but there is a lot of other possibilities. The format of inline coding in HTML2PDF is as follows

    ## the_code##            //the format
    ##{order_data_subtotal }}-{{order_data_discount}}##
      //will print the subtotal minus the discount
    

    The above example is very simple, here we just take one value and subtracts another.

    The below example from the example template delivered with HTML2PDF is more complex. Here we want to show the picture of a product in the product table, for that we need 2 different variables. The first one is Magento build-in media function (also know from Magento CMS) to get the correct path, and then the products image URL. But before we can render the image we have to check if it exists, otherwise the PDF generator will give an error. The way we do that is  by checking if the product URL has the text  “no_selection” (found by looking in the help page variables), and if it is not equal that we render the image. HTML2PDF User manual - using inline coding example

    Not all PHP function can be used. Example: if expression cannot be used, instead use the conditional operator ?: - the eval function is used in HTML2PDF, you can read more about it on php.net

    It can be a bit tricky to get the inline code to work, but setting HTML2PDF in development mode can be very useful when creating and testing inline code

    Be sure that you are signed up for ext4mage newsletter, because we will be sending out tips and examples of ways to use inline coding.

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, print pdf, manual, inline coding

  • HTML2PDF User manual - Example explained

    Posted on July 24, 2012 by ext4mage

    Example explained

    In the HTML2PDF module when just installed is examples of templates. Below is the example for the invoice template’s main text, here you can see that both variables and formatting are used. Make notice of the way tables are used in the examples, if you would do the same with div or similar it would not work. Use the templates as inspiration or as the base of you own templates, just use save as function so the original is not overwritten. HTML2PDF User manual - example of a PDF template

    Notice the way cellspacing and cellpadding is used in the inline tables of the example. Use this way and not style padding or margin elements

    Below is the invoice example in a PDF reader, here you can see all the variables change to real values.

    HTML2PDF User manual - the PDF from the example template

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, pdf layout, manual

  • HTML2PDF User manual - Customer viewing

    Posted on July 24, 2012 by ext4mage

    Customer viewing

    From version 1.3 it is possible to let the customer download the PDF’s from their account, or you can attach it to the different sales emails.

    When the customer logs into his account and goes to My Orders and selects an order the below screen will be shown, here invoice tab selected.

    HTML2PDF User manual - customer myorders print of pdf

    When the customer then clicks on Print Order, Print Invoice etc. it will be the HTML2PDF generated PDF, which is presented to the customer.

    If the function to attach the PDF’s to the sales emails is used, when the emails is then sent, the PDF and the Term and Conditions (is selected) is attach to the email as files.

    HTML2PDF User manual - customer mail with pdf attached

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, manual, customer, frontend

  • HTML2PDF User manual - Development mode

    Posted on July 24, 2012 by ext4mage

    Development mode

    The HTML2PDF module has an inbuilt function to set it in development mode this is very useful when making a template. You set the module into development mode in system settings.

    Be aware that development mode affects the entire module, so it is not possible to print any PDF’s in this mode. Alternative you can also set the module to inactive, so Magento PDF’s are used, and then use the preview function in the template screen.

    When in development mode the code breaks, and prints the templates information and html directly to the screen. The first thing you see is a long list of text like the on below, it contains 2 types of print-out.

    • The first Variable in template is the variable function being performed, you can see the variable code and then the Magento code that is translated into, and finally the real value it produces.
    • Second is the inline code, here you see the code being processed after all variables have been translated into real values. The next line is the html code after the processing, this is the code that will be used in to PDF generator

    HTML2PDF User manual - development mode printout

    If it is still not showing in the PDF as in the development mode print-out, then check the html code to see if anything here is wrong

    Last in the print-out the header, main and footer text is printed out in html. This is the final html code that is being sent to the PDF generator.

    HTML2PDF User manual - development mode printout all

    If everything is looking fine in the development print-out, but not showing up in the PDF then check the html is well-formatted. Even if you are missing an end </b> can break the PDF generator.

     
     
     

    The HTML2PDF extension for Magento
    See more about the magento extension HTML2PDF


    This post was posted in Manual and was tagged with html2pdf, magento, pdf, pdf layout, manual, debugging

Items 1 to 10 of 13 total

Page:
  1. 1
  2. 2