Tag Archives: print pdf

  • 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 - 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 - Index / Intro

    Posted on July 24, 2012 by ext4mage

    Content

     
     

    Intro
    The HTML2PDF module from ext4mage.com will help you make Magento PDF print’s with ease. It is now possible to make Magento PDF’s with a WYSIWYG editor, as you know it from the CMS pages of Magento.
    It also brings you the possibility to setup different PDF’s for you stores and languages. Still with a maximum of reuse.

    This document is a guide to teach you how to use the HTML2PDF module. For installation instructions please see the installation manual. This manual is designed to explain every step of the module, and give an understanding of the different elements and fields used in HTML2PDF module.

    Throughout the manual you will see two types of text elements.

    This type of text will have some tips & tricks to the current subject. Read them, because they will contain information that will save you many hours.

    In these text format code examples and formatting are written.
     
     

    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

  • Mass print action of PDF's

    Posted on May 23, 2012 by ext4mage

    Using the mass action print Invoice, shipping or creditmemo gives error.

    Problem:
    When trying to do the mass print action on the order grid screen, an error is thrown.
    Error text: Page is attached to other documen. Use clone $page to get it context free.

    Solution:
    The most common reason for this, is that another 3. party module is extending the Mage_Adminhtml_Sales_OrderController and therefor the HTML2PDF module is not being run here.

    So find the 3. party extension that also extends Mage_Adminhtml_Sales_OrderController, and add the code found in the file app/code/community/Ext4mage/Html2pdf/controllers/Admin/OrderController.php

    Related product:
      HTML2PDF extension


    This post was posted in FAQ and was tagged with html2pdf, invoice, magento, print pdf

  • HTML2PDF PDF not being shown

    Posted on May 23, 2012 by ext4mage

    Old style Magento PDF is shown not the HTML2PDF template.

    Problem:
    When pressing print in invoice, order, shipping or creditmememo the old Magento style PDF is shown, not the HTML2PDF template PDF.

    Solution:
    The most common reason for this error, is that another extension is installed that also tries to handle the PDF layout. So check if you have any other 3. party modules installed that has something to do with PDF layout. Then try to deactivate them in System->Configuration->Advanced or by going into app/etc/modules and change the 3 party module xml, so it says <active>false</active>.

    Alternative it can also be that the module is not activated. Go into System->Configuration-> Ext4mage->Html2pdf and activate the module if it is not active.

    Know 3. party modules to give problems:

    • MagentoPycho_PdfInvoice

    Related product:
      HTML2PDF extension


    This post was posted in FAQ and was tagged with html2pdf, invoice, magento, print pdf

5 Item(s)