• I have modified this file wp-post-to-pdf.php

    i have replace
    $html .= htmlspecialchars_decode(htmlentities($post->post_content, ENT_NOQUOTES, 'UTF-8', false), ENT_NOQUOTES);

    by

    global $post;
    $ville = get_post_meta($post_id,'contenu_annonce_ville',true);
    $region = get_post_meta($post_id,'contenu_annonce_region',true);
    $contrat = get_post_meta($post_id,'contenu_annonce_contrat',true);
    $new_content=$post->post_content.$ville.$region.$contrat;</p>
    <p> $html .= htmlspecialchars_decode(htmlentities($new_content, ENT_NOQUOTES, 'UTF-8', false), ENT_NOQUOTES);

    In the pdf i have just the title. Not the content and not the content of custom fields.
    If i click SAVE & RESET THE PDF CACHE i have the content and the content of custom fields in my pdf.

    Why my pdf is empty if i don’t click on “SAVE & RESET THE PDF CACHE” ?
    What must i do to have the content in the pdf ?

    Thank you

    http://wordpress.org/extend/plugins/wp-post-to-pdf/

Viewing 1 replies (of 1 total)
  • supertomate

    (@supertomate)

    Hi archiparmentier,

    you have an error with each $post_id … it must be $post->ID
    $ville = get_post_meta($post->ID,'contenu_annonce_ville',true);

Viewing 1 replies (of 1 total)
  • The topic ‘custom fields not displayed in the pdf’ is closed to new replies.