• Resolved herrstrietzel

    (@15broetchenmann)


    Dear Mr. Krauthan,

    wp-mpdf is really an awesome plugin as it’s mpdf core is great for translating html markup+css stylesheets to a neat pdf-layout (as apposed to most other pdf-libraries which simply put out some ugly looking pdf ignoring any kind of styling).

    Is there any chance to get a custom field included in the pdf output?
    In my case it’s a custom wysiwyg-field generated by the plugin “custom field suite”

    My posts have a custom field included by this code:
    echo $cfs->get(‘headercontent’);

    when I try to include this into my default.php theme I get an error “Parse error: syntax error, unexpected T_ECHO”

    The content of this field is by the way an <img> element used for header images.

    the ability to include custom fields would be an amazing feature!

    Kind regards,
    Patrick

    https://ww.wp.xz.cn/plugins/wp-mpdf/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter herrstrietzel

    (@15broetchenmann)

    I finally found a solution. You could also use this for other kinds of custom fields.

    $pdf_output .= 'get_post_meta($post->ID, 'CustomFieldname', true);

    Plugin Author fkrauthan

    (@fkrauthan)

    Sounds good so I don’t need to change anything?

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

The topic ‘custom fields in pdf output?’ is closed to new replies.