Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

PDFs don't generate

I'm trying to export some pdfs from searches in Providence 1.7.6.
A couple weird things are going on.
1st - I can choose one of the pdf export formats, and it does export a pdf. But that pdf is always (now, since updating to 1.7.6) empty - just a 0KB file. When I open that pdf file, there's just an error message saying "Failed to load pdf document," with a button to reload. Reloading does not solve it (which makes, since it's 0KB).
dompdf is there (and CA sees it - most of the time - see issue 2)
wkhtmltopdf is there (and CA see it - most of the time).
Phantomjs is there (but CA does not see it - yes it's installed, and yes the path is configured correctly)

2nd - When I load the configuration check page, sometimes it shows everything in the media processing plugins list as not available. If I reload the page, it shows them.

There's nothing I can see in the logs related to any of this.
Print results as labels gives the same issue as any of the other export options to download a pdf.
The other file formats work fine.

Where should I be looking? What is going on?
The install is on a linux server with plenty of processing power.

Comments

  • edited February 13

    Same problem in Summary View with same configuration. If I open the generated pdf with a text editor I find this text inside:



    Warning: file_get_contents(/tmp/wkhtmltopdf4053706922534.pdf): failed to open stream: No such file or directory in /var/www/html/providence/app/lib/core/Plugins/PDFRenderer/wkhtmltopdf.php on line 117

    Any hint?

  • What version of PHP? What sort of Linux? (I'm assuming Linux) What version if CA?

  • edited February 13

    Seth, thank you for your reply.
    Really, every pdf export does not work. Always the same error.
    The external_application.conf has the right path to wkhtmltopdf binary.
    Just, it seems that it is impossible to write into /tmp directory.
    Is this located in the root? I have one there with 777 permissions.
    Anyway, here it is the info you requested. Thanks for your help!

    G

    PHP Version 7.0.30-0+deb9u1
    Linux mvca.scv.va 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64

  • Try it with dompdf and see if that makes a difference. An easy way to disable wkhtmltopdf is to simply make the path to it invalid in external_applications.conf. If it works with dompdf then we can be reasonably confident that the problem lies with wkhtmltopdf.

  • Seth, thank you for the tip.
    I noted that changing the external_applications.conf in the /local folder did not change the rendering program.
    I had to delete the external_application.conf in /conf dir to make CA read the /local one overriding the original file.
    Is this behavior correct?
    Anyway, now, it seems to work also wkhtmltopdf.

    Thankyou again!

    Giovanni

  • It looks like yeah, in this version, the configuration files don't work as they should (that explains some things, actually). Our workaround was telling domPDF to use wkhtmltopdf. . .

  • That's not normal behavior. It should read the local one and overlay the values from it on the stock one in /conf. If it's not working like that it might be an issue with the filesystem you're using (we use file modification times to figure out when to reparse the files). You may also want to try clearing the application cache in app/tmp.

Sign In or Register to comment.