Viewing 5 replies - 1 through 5 (of 5 total)
  • Perhaps your plugin creates a custom post type. In that case you should read this link: http://wordpress.org/support/topic/product-post-type?replies=5

    to find out if you have a custom post type, you should read your functions.php file inside your theme (or perhpas insider your plugin source code) looking for something like this:

    register_post_type( 'listings', ...)

    In this example, it’s registered a custom post type ‘listings’

    If so, you must setup wordpress-pdf in your functions.php:

    if(function_exists('set_pdf_print_support')) {
    	 set_pdf_print_support(array('post', 'page', 'listings'));
    }

    Hope it helps…

    Thread Starter endime

    (@endime)

    Tnks for the plugin and the time, help me very much,yes the post type is ‘property’ if anyone is usefull, and i wonder if there is a documentation about customizing the template or how i can take the default stilesheet of my theme.

    Sorry the inconveniences and therefore thanks for the great and usefull work

    Plugin Author Viljami Kuosmanen

    (@zuige)

    Hi! Thanks for using our plugin!

    To return to your original question about the dynamic content on the print page; you might want to enable this option in you wp-config.php to disable caching the pdf output define('DISABLE_PDF_CACHE', true); This fixes problems with any dynamic content being outdated on the pdf output.

    As the plugin is still quite fresh, we unfortunately don’t have much documentation on customising the pdf templates. Essentially, the plugin should however be able to turn any HTML file into a PDF.

    To load your default stylesheet for example, just add this into the <head> section of your pdf-template file. <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>">.

    However, I suggest you instead create custom stylesheets for the PDF template due to DOMPDF and your browser rendering stylesheets slightly differently. You may need to apply some special CSS rules for the print template.

    The easiest way to customise your print page, is by looking at your /pdf-preview/ endpoint and customising your index-pdf.php file located in your theme directory.

    Let me know if I can be of any more assistance!

    – Antti

    Thread Starter endime

    (@endime)

    Tanks for the response, and yes its working ( not as i wish) but i can modify until my template show as i need;
    Great work, and again tanks for the response an the plugin

    Plugin Author Viljami Kuosmanen

    (@zuige)

    Glad to help!

    Yes, unfortunately the DOMPDF library isn’t quite perfect at rendering modern HTML in the same manner that browsers do. It’s the best thing currently available though.

    I’ve found that it is possible to fiddle about with the output to get the results you need with relative ease. The end product can be quite satisfactory that way.

    – Antti

    [topic marked as resolved]

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Dynamic Content (Portfolio)’ is closed to new replies.