WordPress.org

Ready to get started?Download WordPress

Forums

POST2PDF Converter
[resolved] background image (6 posts)

  1. ooohh04
    Member
    Posted 2 years ago #

    Hi,
    I know that in tcpdf library is possible to add image background.
    Is it possible to add in the plugin?
    Thanks in advance.
    Regards
    Giorgio Scappaticcio

    http://wordpress.org/extend/plugins/post2pdf-converter/

  2. redcocker
    Member
    Plugin Author

    Posted 2 years ago #

    Hi, ooohh04 san

    I'll add this feature in future release.

  3. ralphmark
    Member
    Posted 2 years ago #

    How much I know about wp it is not possible to add image as plugin background.

  4. ooohh04
    Member
    Posted 2 years ago #

    Hi Redcocker san,
    I am able to code, and
    I find this example in the tcpdf library:
    http://www.tcpdf.org/examples/example_051.phps , can you explain me how to integrate this in the pdf-maker file?
    Regards
    Giorgio

  5. redcocker
    Member
    Plugin Author

    Posted 2 years ago #

    hI, ooohh04 san

    This is just an example code.

    Please add following code into /post2pdf-converter/post2pdf-converter-pdf-maker.php line 14

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    Remove following code from /post2pdf-converter/post2pdf-converter-pdf-maker.php line 373-374

    require_once('tcpdf/config/lang/'.$config_lang.'.php');
    		require_once('tcpdf/tcpdf.php');

    Replace /post2pdf-converter/post2pdf-converter-pdf-maker.php line 392-394 with following code.

    $pdf = new POST2PDF_Converter_PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', true, false);
    		} else {
    			$pdf = new POST2PDF_Converter_PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false, false);

    Replace /post2pdf-converter/tcpdf/config/tcpdf_config.php line 95-99 with following code.

    if (!defined('K_PATH_FONTS') && $POST2PDF_Converter_PDF_Maker->post2pdf_conv_setting_opt['font_path'] == 1) {
    		define('K_PATH_FONTS', WP_CONTENT_DIR.'/tcpdf-fonts/');
    	} else {
    		define ('K_PATH_FONTS', K_PATH_MAIN.'fonts/');
    	}
  6. ooohh04
    Member
    Posted 2 years ago #

    Hi Redcocker san,
    Thank you very much! I will try and let you know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic