• Resolved DickRaney

    (@dickraney)


    I used the [WORDPRESS_PDF] shortcode and when I clicked the PDF button just got the page reloaded with a bunch of garbled code above header.

    %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R /F3 10 0 R >> >> /MediaBox [0.000 0.000 612.000 792.000] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (��dompdf 1.0.2 + CPDF) /CreationDate (D:20220320171940+00'00') /ModDate (D:20220320171940+00'00') >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 612.000 792.000] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Length 758 >> stream 0.000 0.000 0.000 rg BT 35.000 692.348 Td /F2 15.0 Tf [(Laurel Stern Boeck)] TJ ET 0.251 0.251 0.251 rg BT 35.000 653.431 Td /F3 14.0 Tf [(Description)] TJ ET q 35.000 635.962 0.000 0.000 re W n Q 0.502 0.502 0.502 rg 0.502 0.502 0.502 RG 35.000 731.330 m 602.000 731.330 l 602.000 732.830 l 35.000 732.830 l f 0.000 0.000 0.000 rg BT 512.670 766.232 Td /F3 10.0 Tf [(COMPANY NAME)] TJ ET BT 462.590 754.022 Td /F2 10.0 Tf [(Address | Phone | Link | Email)] TJ ET 0.502 0.502 0.502 rg 35.000 52.000 m 602.000 52.000 l 602.000 50.500 l 35.000 50.500 l f 0.000 0.000 0.000 rg BT 44.000 31.732 Td /F2 10.0 Tf [(Page 1)] TJ ET q 44.000 17.080 549.000 12.210 re W n 0.251 0.251 0.251 rg BT 268.485 19.522 Td /F2 10.0 Tf [(portraitassociates.com)] TJ ET Q endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 10 0 obj << /Type /Font /Subtype /Type1 /Name /F3 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 11 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000295 00000 n 0000000324 00000 n 0000000473 00000 n 0000000576 00000 n 0000001385 00000 n 0000001494 00000 n 0000001601 00000 n trailer << /Size 11 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1714 %%EOF

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author WP Swings

    (@wpswings)

    Hello,

    pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php at line no 297

    elseif ( ‘open_window’ === $pgfw_generate_mode ) {

    @ob_end_clean(); // Add this line on your code

    $path = $upload_basedir . $document_name . ‘.pdf’;

    $dompdf->stream(

    $document_name . ‘.pdf’,

    array(

    ‘compress’ => 0,

    ‘Attachment’ => 0,

    )

    );

    }
    Regards,

    Thread Starter DickRaney

    (@dickraney)

    Add line to what code? Edit plugin file? I don’t have other code, just a short code to insert the button.

    Plugin Author WP Swings

    (@wpswings)

    Hello,

    Yes, you need to edit the plugin file and add the line of code which we have provided there.

    Path of file: pdf-generator-for-wp/common/class-pdf-generator-for-wp-common.php

    Regards

    Thread Starter DickRaney

    (@dickraney)

    Want to edit just get overwritten with the next update?

    Plugin Author WP Swings

    (@wpswings)

    Hello,

    We will make these changes in the upcoming versions also. So that you can easily update the plugin in the future.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.