• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

PDF produces grey page

Metabern

Member
After getting Fabrik to successfully grab all of the required elements from my Virtuemart order setup to create custom purchase orders, the PDF button on my form detail page produces a grey screen with no pdf, not even the default one. This was working before and I'm not sure how and why its not now.

Please help.

Cheers
 
Can you enable PDF debug, and take a look at the simple HTML output, see if there's anything obviously moofed in that.

Also, perhaps try switching PDF engines in Fabrik global options (so DOMPDF to MPDF, or vice versa).

Typically, problems with PDF generation are down to HTML markup in the view which the PDF engine's HTML to PDF coverter can't handle. Sometimes DOMPDF will render stuff MPDF can't, or vice versa.

First step is to get the raw HTML from debug mode, and run that through something like w3's validator, see if there's any obvious formatting errors (missing close divs, etc).

-- hugh
 
Can you enable PDF debug, and take a look at the simple HTML output, see if there's anything obviously moofed in that.

Also, perhaps try switching PDF engines in Fabrik global options (so DOMPDF to MPDF, or vice versa).

Typically, problems with PDF generation are down to HTML markup in the view which the PDF engine's HTML to PDF coverter can't handle. Sometimes DOMPDF will render stuff MPDF can't, or vice versa.

First step is to get the raw HTML from debug mode, and run that through something like w3's validator, see if there's any obvious formatting errors (missing close divs, etc).

-- hugh


I enabled debug PDF mode and tried pdf and dompdf, I am not seeing any html anywhere. Is there a log somewhere?
 
With PDF debug enabled, when you click the PDF button in the details page, you should get an HTML response back in the browser (replacing the normal details view). Is that not happening?

-- hugh
 
With PDF debug enabled, when you click the PDF button in the details page, you should get an HTML response back in the browser (replacing the normal details view). Is that not happening?

-- hugh

In Safari I get a grey screen, In Chrome a grey screen with "Error - Failed to load PDF document"
 
Hmmm, is "Error - Failed to load PDF document" the exact error message?

If so, that's strange, because that string doesn't occur anywhere in Fabrik.

Are you sure you haven't installed or enabled some other extension that handles the format=pdf document type?

-- hugh
 
Hmmm, is "Error - Failed to load PDF document" the exact error message?

If so, that's strange, because that string doesn't occur anywhere in Fabrik.

Are you sure you haven't installed or enabled some other extension that handles the format=pdf document type?

-- hugh


Yes thats the exact message. Appears to be a Chrome Browser error message.

THe PDF extensions that are running (Virtuemart & VM-Invoice) are working fine.

Looking at Troester's reference to my previous PDF issues, I tried reinstalling TCPDF from VM. Now I get the following: (No more grey screen)

0 Call to undefined method JDocumentPDF::setPaper()

Your help is greatly appreciated

Cheers
 
Are you sure our PDF document type is still there? That the Fabrik PDF document files ...

https://github.com/Fabrik/fabrik/tree/master/libraries/src/Document

... exist in your ./libraries/src/Document folder?

Your error message, referencing JDocumentPDF, seem to indicate that Joomla didn't autoload our PdfDocument. The way the J! document loader works is here ...

https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Document/Document.php#L292

... where it first tests to see if the PdfDocument class exists, and if not, test for JDocumentPDF.

But the main problem is that J! autoloads the document handler. So you can only have one handler for a given document type.

-- hugh
 
You probably overwrote the PdfDocument files in this folder...

https://github.com/Fabrik/fabrik/tree/master/libraries/src/Document

... with the correct (Fabrik) ones. Next time you update whatever else it is that implements a pdf document type, you'll overwrite ours again.

That's the problem with PDF. There can only be one document type for it (or for any doc type) in Joomla's document library location. So when you try and install two handlers, they overwrite each other's files.

Hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top