Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author dinamiko

    (@dinamiko)

    Hi andrianiannalisa,

    this is not implemented yet in the actual version (1.2) of DK PDF.
    I already have a ticket for this:
    https://github.com/Dinamiko/dk-pdf/issues/3

    I’m going to create settings for this in the next version (1.3), in the meanwhile you can adjust these values manually in the code:

    in dk-pdf/includes/dkpdf-functions.php line 101:
    $mpdf = new mPDF( '','A4','','','15','15','28','18' );

    margin values (in points):
    margin_left = 15
    margin_right = 15
    margin_top = 28
    margin_bottom = 18

    also you can add 2 more values at the end
    margin_header
    margin_footer

    more info of the mPDF function here:
    http://mpdf1.com/manual/index.php?tid=184

    You can do this manually or wait for the next version of DK PDF.

    Best.

    Thread Starter andrianiannalisa

    (@andrianiannalisayahooit)

    OK perfect. It works fine!
    another question…
    I see the links that do not work in the pdf generated. How can I make them active or not make them appear as a link (blue and underlined).
    Best regards

    Plugin Author dinamiko

    (@dinamiko)

    Hi andrianiannalisa,

    DK PDF calls the_content() function for getting the content in the page, if you have links in your page, these are going to work as links in the generated PDF.

    I have to look deeper at how mPDF library manages the CSS, right now we get an aproximation of the CSS of the theme you’re using, not bad, but sure that this can be managed better.

    So please, write here what you need to do/adjust exactly, and I’m going to look a this in the next version of the plugin, thanks in advance.

    Best.

    Thread Starter andrianiannalisa

    (@andrianiannalisayahooit)

    Hi there,
    my web pages are built with the tab, so the titles of tab (appear twice: in the a header of the pdf and, correctly, as the title of the chapter) appear as links but if i click on, nothing happens.

    See the screenshot http://www.maggialetti.it/viaggi-di-gruppo-in-bus/tab_web.png and the pdf generated
    http://www.maggialetti.it/viaggi-di-gruppo-in-bus/mpdf.pdf

    Best regards

    Plugin Author dinamiko

    (@dinamiko)

    Hi andrianiannalisa,

    I think the only solution for this is doing a customization of dkpdf-index.php template (responsible of printing the content in the pdf).

    more info here on how to customize a dk pdf template:
    http://wp.dinamiko.com/demos/dkpdf/doc/how-to-use-dk-pdf-templates-in-your-theme/

    you can see here an example of a customization I did for a client (click Download PDF):
    http://comasrealestate.com/immoble/modern-apartment-with-pool-parking/

    what I did in dkpdf-index.php template was instead of getting the_content() I did a WP_Query of the content I need (in this case a properties custom post type, custom fields, thumbnails…).

    As you can see, DK PDF works out of the box for pages with normal content, for a more fine tuning of the content, you need to work with the template and adjust based on your specific needs.

    You can do it by yourself, hire a WordPress developer, or hire me 🙂

    Best.

    Thread Starter andrianiannalisa

    (@andrianiannalisayahooit)

    ok, thanks very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘manage the style of text generated in the PDF’ is closed to new replies.