We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21560
    • 145 Posts
    Thanks, at least I was close. ^_^

    Good luck!
      [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
      • 21560
      • 145 Posts
      Minor update:

      replace: $pdf =& new PDF();
      with: $pdf = new PDF();

      To remove the error messages in the system events...

      I’m such a dolt...
        [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
        • 25551 ☆ A M B ☆
        • 1,231 Posts
        Any chance someone can write up an exact how to for the PDF creation as I only get errors... I have tried 3 different modx builds over the months and tried this snippet with each and the same errors happen everything time.

        When I open the PDF

        An error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.

        I have document 109 as a container which is a regular page on my site.

        Document 110 is the PDF and is Doc 109 container.

        I have tried the snippet on each page for the same error to display.
        [!MakePDF? &parent=`110` !]

        [!MakePDF? &parent=`109` !]


        Could someone be kind enough to type up a working guide as the install instructions don’t seem to be complete or precise enough to follow.

        Thanks!

          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 21560
          • 145 Posts
          If you get an error, there are two things you should do to clarify them.

          One: open the resulting file in a text editor, like Notepad. If Acrobat can’t read them, it means no PDF is exported but a plain text file, usually with PHP or other errors. Because of the extention, however, windows still opens it the stupid way.

          Two: Your MODx sytem event log. (In your manager, to to Reports -> System Events);
            [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
            • 25551 ☆ A M B ☆
            • 1,231 Posts
            Thanks for the reply Nimja!

            System log

            Assigning the return value of new by reference is deprecated

            %PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream xœ?”KoÂ0 €ïý>nLìÄIzÝ[ˆICëaw`ˆÇxHhÿ~I¡k§ATMUÓ&úì$þÒ2 2…âà?ÝÐ B¥ x‡û" [ô ž²?bWoOÅóðŠy$6 `�‡ðœ‡û1ŒÄ!E¼êW¬›ñ2ë/C‚»5Œ²ÑqRþ5©Bòe?ùjÂ7{ÔÎå(– Öb®ëþ^aÇèB´&$ÎTRm�zpZ>œ]À¹hKqʽŸîö³UÙd8‡›0”Wøb¶š¥iv¨uCsš&}ýÐ:I[gQSC›4-R©¢%Mk?®µK›¦9”¸µK÷×ÁÅbst¶Q|ê_P,Î çÿU,B(¾­8íA´BÍÏ$ ¹Zw°,Ê §žÖlB}ÄtÕlŒ û®š ‡/‡»j6¡Ìì.k&ðI ,˜Oàíúók;+?öÀJ¹^h|ÐZý}&Ó]’ow8^//,G$G+­|-?ßeöÐ endstream endobj 1 0 obj <> endobj 5 0 obj <> endobj 6 0 obj <> endobj 7 0 obj <<<> /Properties <<> >> /ExtGState <> >> /Length 79 >> stream xœÓ÷I¬L-RÐ÷u6PprqVà*ä2P°01Ô³°T0µ4Õ327SÐ…ò‹R¹Âò€*ô݃ Ò‹¹ôÝr \ò¹¹\}?Z¹�×› endstream endobj 8 0 obj <<<> /ProcSet [/PDF /Text ] /ExtGState <> >> /BBox [86.2002 796.406 550.29 83.7324 ] >> stream BT 0.5 0.5 0.5 1 k 1 i /GS0 gs /T1_0 1 Tf 0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 44.7977 78.5411 -78.5411 44.7977 151.9395 94.9319 Tm [(EX)9(A)4(MPLE )41(TEMPLA)77(TE)]TJ ET endstream endobj 9 0 obj <> endobj 10 0 obj <> endobj 11 0 obj <> endobj 12 0 obj <> endobj 13 0 obj <> endobj 14 0 obj <> stream H‰|?mLSWÇϥ܌”±À Y|É `Óvš9“F™q«“_–Åh/ô–6ÚÜ–BùdÜÄŽ—j¨“X¬Ê6tc›FˆúÁ—˜ ‹f!F—¡îÛsÊ©Ùîußw><çùŸçí÷eg!Žãж;«í›v½¿-¢ø$w?â¯pÊ -?’¢Kh1G?Ùô]½Èֲ%ß.ƒÄò«éË(‹ãNŽlòÔÒoˆ˜«ªªÊ5k!o.«Ýí¯“Im$’›‚dks½_ ø)$»MÄÞØHœZY?8å ¬„µÇ?¦Z©QšCd³Åj)·®3›þ##¾ ‘ˆ"7øÔnŠì&!ErËM’ò%ñ{ÈÿLªü¸vG$ “uÄ-{?z8T†V¢ dBk‘­Gyê? mè3t ]E3œƒà.fé7D’èâ§Ú÷&tÑlÚ™®Étbèf×D¶Žðð3®ˆ ‰ÌᜠÞûƇ?LÕ˜^5?iJÎ&Ãà½S¢­ƒô¦áÝ�^ñóòj—ö´?/Ã,òÚÆ?ÅSàåwÄIØÍž7ëû%· ÷¹ûêû÷M²]FÁMAÇ=𥸙yýˆEÖ>ø)•A¯mtYŠ]€èlj¦è‹V-i¦?æ§Ø}aÁ´ô@Þª0}<_p-½ÙH¯)œÃ’ Àt˜éÙ,o8×d ÚÛ·ävâö©Ð´ÿË?Y£5ö¨€?p~?ýÝ |×ã¢.<ðá–3幆sÀ±i~C>ü1üìǹS³EÝøÐ1Æ÷Vä {Ôí?OÁÐ]•j@óp sâô¡ï‹çîŽ_,I\ºùÎ?–qÏ™’ÑzÇ kqõŽƒ_K¥ó±§¨û|ñ_·\fÓ§Ÿ—5»zÛJ…õÉ0]œæÀµ Wá]„ºéL‡$,|• §m­Ü Mèèo…Ì/A‚‡ü*\ÉÌŠ«½±­¾¨GFÛ†•ßÍ`6®Äð{ÂêØŸü+üV?\øY]-é>éq>akŒÂþxÚv”í?Ce|<ž Æô“sÄ2þø…ØP,§$éª>pì}Þí·òzôoƒw?ÿ`�4?‰` endstream endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 5 0 R /F2 6 0 R >> /XObject << /TPL1 7 0 R >> >> endobj 15 0 obj << /Producer (FPDF 1.53) /Title (XHTML designers) /Author (Rossco) /Creator (Rossco) /CreationDate (D:20081030121824) >> endobj 16 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /FitH null] /PageLayout /OneColumn >> endobj xref 0 17 0000000000 65535 f 0000000529 00000 n 0000003521 00000 n 0000000009 00000 n 0000000087 00000 n 0000000616 00000 n 0000000720 00000 n 0000000816 00000 n 0000001285 00000 n 0000001695 00000 n 0000001830 00000 n 0000001899 00000 n 0000002202 00000 n 0000002328 00000 n 0000002608 00000 n 0000003647 00000 n 0000003784 00000 n trailer << /Size 17 /Root 16 0 R /Info 15 0 R >> startxref 3888 %%EOF


            You can go here to see the link that should open the pdf.

            http://xhtmldesigners.com/pdftest


            I have a parent folder set to use a regular template with the call [!Ditto? &parent=`110` &tpl=`GenericPagesTpl` !]

            This displays a list of child folders...

            Child folder is set to template blank, pdf/application, [!MakePDF? &parent=`110` !]

            Under this child folder I have 2 sub childs that are set to template blank... very basic text, no html or css styles.

              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart
              • 21560
              • 145 Posts
              Yes, I saw that error message while back.

              In your snippet:

              replace: $pdf =& new PDF();
              with: $pdf = new PDF();

              That should fix it. (i’m checking if the original post is fixed as well)
                [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
                • 25551 ☆ A M B ☆
                • 1,231 Posts
                Assigning the return value of new by reference is deprecated

                %PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream xœ?”KoÂ0 €ïý>nLìÄIzÝ[ˆICëaw`ˆÇxHhÿ~I¡k§ATMUÓ&úì$þÒ2 2…âà?ÝÐ B¥ x‡û" [ô ž²?bWoOÅóðŠy$6 `�‡ðœ‡û1ŒÄ!E¼êW¬›ñ2ë/C‚»5Œ²ÑqRþ5©Bòe?ùjÂ7{ÔÎå(– Öb®ëþ^aÇèB´&$ÎTRm�zpZ>œ]À¹hKqʽŸîö³UÙd8‡›0”Wøb¶š¥iv¨uCsš&}ýÐ:I[gQSC›4-R©¢%Mk?®µK›¦9”¸µK÷×ÁÅbst¶Q|ê_P,Î çÿU,B(¾­8íA´BÍÏ$ ¹Zw°,Ê §žÖlB}ÄtÕlŒ û®š ‡/‡»j6¡Ìì.k&ðI ,˜Oàíúók;+?öÀJ¹^h|ÐZý}&Ó]’ow8^//,G$G+­|-?ßeöÐ endstream endobj 1 0 obj <> endobj 5 0 obj <> endobj 6 0 obj <> endobj 7 0 obj <<<> /Properties <<> >> /ExtGState <> >> /Length 79 >> stream xœÓ÷I¬L-RÐ÷u6PprqVà*ä2P°01Ô³°T0µ4Õ327SÐ…ò‹R¹Âò€*ô݃ Ò‹¹ôÝr \ò¹¹\}?Z¹�×› endstream endobj 8 0 obj <<<> /ProcSet [/PDF /Text ] /ExtGState <> >> /BBox [86.2002 796.406 550.29 83.7324 ] >> stream BT 0.5 0.5 0.5 1 k 1 i /GS0 gs /T1_0 1 Tf 0 Tc 0 Tw 0 Ts 100 Tz 0 Tr 44.7977 78.5411 -78.5411 44.7977 151.9395 94.9319 Tm [(EX)9(A)4(MPLE )41(TEMPLA)77(TE)]TJ ET endstream endobj 9 0 obj <> endobj 10 0 obj <> endobj 11 0 obj <> endobj 12 0 obj <> endobj 13 0 obj <> endobj 14 0 obj <> stream H‰|?mLSWÇϥ܌”±À Y|É `Óvš9“F™q«“_–Åh/ô–6ÚÜ–BùdÜÄŽ—j¨“X¬Ê6tc›FˆúÁ—˜ ‹f!F—¡îÛsÊ©Ùîußw><çùŸçí÷eg!Žãж;«í›v½¿-¢ø$w?â¯pÊ -?’¢Kh1G?Ùô]½Èֲ%ß.ƒÄò«éË(‹ãNŽlòÔÒoˆ˜«ªªÊ5k!o.«Ýí¯“Im$’›‚dks½_ ø)$»MÄÞØHœZY?8å ¬„µÇ?¦Z©QšCd³Åj)·®3›þ##¾ ‘ˆ"7øÔnŠì&!ErËM’ò%ñ{ÈÿLªü¸vG$ “uÄ-{?z8T†V¢ dBk‘­Gyê? mè3t ]E3œƒà.fé7D’èâ§Ú÷&tÑlÚ™®Étbèf×D¶Žðð3®ˆ ‰ÌᜠÞûƇ?LÕ˜^5?iJÎ&Ãà½S¢­ƒô¦áÝ�^ñóòj—ö´?/Ã,òÚÆ?ÅSàåwÄIØÍž7ëû%· ÷¹ûêû÷M²]FÁMAÇ=𥸙yýˆEÖ>ø)•A¯mtYŠ]€èlj¦è‹V-i¦?æ§Ø}aÁ´ô@Þª0}<_p-½ÙH¯)œÃ’ Àt˜éÙ,o8×d ÚÛ·ävâö©Ð´ÿË?Y£5ö¨€?p~?ýÝ |×ã¢.<ðá–3幆sÀ±i~C>ü1üìǹS³EÝøÐ1Æ÷Vä {Ôí?OÁÐ]•j@óp sâô¡ï‹çîŽ_,I\ºùÎ?–qÏ™’ÑzÇ kqõŽƒ_K¥ó±§¨û|ñ_·\fÓ§Ÿ—5»zÛJ…õÉ0]œæÀµ Wá]„ºéL‡$,|• §m­Ü Mèèo…Ì/A‚‡ü*\ÉÌŠ«½±­¾¨GFÛ†•ßÍ`6®Äð{ÂêØŸü+üV?\øY]-é>éq>akŒÂþxÚv”í?Ce|<ž Æô“sÄ2þø…ØP,§$éª>pì}Þí·òzôoƒw?ÿ`�4?‰` endstream endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 5 0 R /F2 6 0 R >> /XObject << /TPL1 7 0 R >> >> endobj 15 0 obj << /Producer (FPDF 1.53) /Title (XHTML designers) /Author (Rossco) /Creator (Rossco) /CreationDate (D:20081030131653) >> endobj 16 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /FitH null] /PageLayout /OneColumn >> endobj xref 0 17 0000000000 65535 f 0000000529 00000 n 0000003521 00000 n 0000000009 00000 n 0000000087 00000 n 0000000616 00000 n 0000000720 00000 n 0000000816 00000 n 0000001285 00000 n 0000001695 00000 n 0000001830 00000 n 0000001899 00000 n 0000002202 00000 n 0000002328 00000 n 0000002608 00000 n 0000003647 00000 n 0000003784 00000 n trailer << /Size 17 /Root 16 0 R /Info 15 0 R >> startxref 3888 %%EOF

                I replaced the part of code you mentioned and the system event has this error.

                Also when you open the pdf, you do see the text in the document but it errors.
                  Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                  AugmentBLU - MODX Partner

                  BLUcart - MODX Revolution E-Commerce & Shopping Cart
                  • 21560
                  • 145 Posts
                  Well, the only thing you could try is disabling warnings, by adding (to the start of the code, below <?php):
                  ini_set ('display_errors', 0);


                  Ever since the fix, it’s been running without warnings or errors on my server, so it’s hard to figure out what’s happening without more detail. Did you check the system events?
                    [font=Times]Comics, stories, music, graphics, games and more! http://Nimja.com
                    • 25551 ☆ A M B ☆
                    • 1,231 Posts
                    Yes the quotes above are from the system events. I tried the ini_set (’display_errors’, 0); code and that hasn’t helped any.
                      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                      AugmentBLU - MODX Partner

                      BLUcart - MODX Revolution E-Commerce & Shopping Cart
                      • 25551 ☆ A M B ☆
                      • 1,231 Posts
                      I got it working, seems there is a problem with the included Page.pdf. I replaced it with a blank one I created and the snippet works now. laugh
                        Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                        AugmentBLU - MODX Partner

                        BLUcart - MODX Revolution E-Commerce & Shopping Cart