Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter dtudancing

    (@dtudancing)

    Thanks for your answer. Please have a look when you find the time.

    To me, it looks like in the else-branch the default page orientation (PDF_PAGE_ORIENTATION) accidentally gets assigned to the variable holding the page’s unit measure ($unit) instead of to the variable holding the page’s orientation ($orentation).

    Thread Starter dtudancing

    (@dtudancing)

    The context of the assignment is:

    if ( isset( $this->options['orientation'] ) ) {
    				$orientation = ( $this->options['orientation'] );
    			} else {
    				$unit = PDF_PAGE_ORIENTATION;
    			}
    			$pdf = new MYPDF( $orientation, $unit, $pagesize, true, 'UTF-8', false );
    Thread Starter dtudancing

    (@dtudancing)

    This change fixes the error

    Fatal error: Uncaught exception ‘Exception’ with message ‘TCPDF ERROR:
    Incorrect unit: p’ in /customers/5/1/2/danc-ing.dk/httpd.www/wp-content/plugins/wp-post-to-pdf-enhanced/tcpdf/tcpdf.php:2898
    Stack trace:
    #0 /customers/5/1/2/danc-ing.dk/httpd.www/wp-content/plugins/wp-post-to-pdf-enhanced/tcpdf/tcpdf.php(2024): TCPDF->Error(‘Incorrect unit:…’)
    #1 /customers/5/1/2/danc-ing.dk/httpd.www/wp-content/plugins/wp-post-to-pdf-enhanced/tcpdf/tcpdf.php(1899): TCPDF->setPageUnit(‘P’)
    #2 /customers/5/1/2/danc-ing.dk/httpd.www/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php(268): TCPDF->__construct(NULL, ‘P’, ‘LETTER’, true, ‘UTF-8’, false)
    #3 /customers/5/1/2/danc-ing.dk/httpd.www/wp-content/plugins/wp-post-to-pdf-enhanced/wp-post-to-pdf-enhanced.php(142): wpptopdfenh->generate_pdf_file(2741)
    #4 [internal function]: wpptopdfenh->generate_pdf(Object(WP))
    #5 /customers/5/1/2/danc-ing.dk/httpd.www/wp-includes/plugin.php(601): call_user_func_array(Array, Array)
    #6 /customers/5/1/2/danc-ing.dk/httpd.www/wp-inc in /customers/5/1/2/danc-ing.dk/httpd.www/wp-content/plugins/wp-post-to-pdf-enhanced/tcpdf/tcpdf.php on line 2898

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