WordPress.org

Forums

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

  1. Hanne10001
    Member
    Posted 1 year 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

    http://wordpress.org/plugins/post-pdf-export/

  2. Hanne10001
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    to
    $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

Tags

No tags yet.