Post PDF Export
Changing the export pdf size (3 posts)

  1. Hanne10001
    Posted 2 years ago #

    I am trying to change the visitor export pdf size to a6 format for ereader.

    I went to dompdf_config.custom.inc.php in dompdf folder and changed the value of DOMPDF_DEFAULT_PAPER_SIZE to "a6" and removed the comment slashes but no result.

    The settings on the plugins 'download PDF' page where I end clicking the download button seems not to be related to visitor downloads of posts?

    I also have a minor problem changing the name of the visitor download file to Posttitle followed by category name (default is posttitle)

    Best regards


  2. Hanne10001
    Posted 2 years ago #

    Possible solution to visitor download papersize is change to

    $dompdf->set_paper( 'a6' , 'portrait' )in function download_post() in the plugins inc/core_class.php

  3. Hanne10001
    Posted 2 years ago #

    In the same function as above you can change
    $filenmae = preg_replace('/[^a-z0-9]/i', '_', $single->post_title )

    $categories=wp_get_object_terms( $post[0]->ID, 'category');
    $filenmae = preg_replace('/[^a-z0-9]/i', '_', $single->post_title ).' '.$categories[0]->slug;

    if the posts like in my case only has one category. But these are temporary solutions

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post PDF Export
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.