PDF Corrupt error Roboto

    • Victor Khaireddin
      Participant
      # 10 months, 2 weeks ago

      Hi

      I am experiencing a problem on WP Customer Area plugin, I will explain step by step the problem

      1) I download the PDF I created from Jotform (The PDF shows up perfectly).
      2) I upload it within WP Customer Area.
      3) When I view and download it this appears with the corrupted font. But there is more Acrobat Reader detects me a problem in the Roboto font. I attach image

      PS: I tried to see the storage folder inside the plugin, and it shows it perfectly as it was when I uploaded it

      I would like to know how to fix it

    • Thomas
      Keymaster
      # 10 months, 1 week ago

      Hello,

      There should be no reason a PDF file becomes corrupted after upload.

      I don’t know how JotForm works, but you should probably see an option to include the font into the file while exporting?

      There’s probably an issue with the way the font is bundled into the PDF, which could lead to this error when you download it back again.

      you could try this:

      • instead of uploading to your site, try to send the PDF via email, and try to open it on differrent devices (especially some, where the font is not installed on the system)
      • for testing purpose, try to replace the Roboto font within your PDF with a standard one, and see if you get the same issue (should help to isolate the problem)

      Regards.

      Want to help WP Customer Area? It only takes few seconds!
      Rate & review the plugin on WordPress.org 🙂

      • Victor Khaireddin
        Participant
        # 10 months, 1 week ago

        Hi Thomas

        Thank you for your response. Basically it is not after the upload, the PDF file is uploaded correctly, the problem is when it is downloaded that it shows according to Abode Reader corrupt in the font. I will try the various options though

        Regards

      • Thomas
        Keymaster
        # 10 months, 1 week ago

        Ok,

        Could you also try to download the file through another browser, or by using the private window mode (in order to make sure you don’t have a browser extension affecting the file while downloading)?

        Regards.

        Want to help WP Customer Area? It only takes few seconds!
        Rate & review the plugin on WordPress.org 🙂

      • Victor Khaireddin
        Participant
        # 10 months, 1 week ago

        Hi Thomas

        I tried it thinking it was a broswer or cache problem and completely ruled it out. However, I am trying to integrate the font inside WP or to change the PDF font as you recommended

        Regards

    • Thomas
      Keymaster
      # 10 months, 1 week ago

      Hi,

      However, I am trying to integrate the font inside WP

      You’ll just lose your time. Downloading and opening a PDF file does not rely on WordPress. The PDF file is downloaded on your computer then opened directly into the browser, or youll be prompted to save it locally.

      You could maybe try to open the PDF file into differrent browsers instead of Acrobat Reader (drag and drop into edge or chrome) and see if the issue persist. Because Acrobat Reader could probably try to load a font from your system instead of the one bundled in the PDF.

      Regards.

      Want to help WP Customer Area? It only takes few seconds!
      Rate & review the plugin on WordPress.org 🙂

      • Victor Khaireddin
        Participant
        # 10 months, 1 week ago

        Hi

        Then I tried to open the PDF file in different file broswer like Chrome and Edge, but there are several texts where the font is messed up and unreadable

        Regards

    • Victor Khaireddin
      Participant
      # 10 months, 1 week ago

      Hi Thomas

      At the moment I tried testing on Localhost by making a copy of the site, and strangely enough and the various PDFs work. Could it be an error due to the PHP on my site?

      I am waiting for your news

      Regards

    • Thomas
      Keymaster
      # 10 months, 1 week ago

      Hello,

      Could it be an error due to the PHP on my site?

      I’ll be honest, I don’t know.

      But now that you have a working copy of your site where it works, and since it somehow proved that WP CustomerArea doesn’t seem to prevent (in any case) the file to be downloaded, I would recommend investigating your server configuration.

      I am not saying there is not an issue within the plugin. For instance, there could be a function that works normally in your case with PHP lower than 8.0 but breaks with PHP 8+ versions.


      At the moment I tried testing on Localhost by making a copy of the site

      If you made a complete copy of the site (same plugins, same database etc…), then, there are more chances that the issue comes from a server configuration, yes. My first try would be to set the same PHP version on the server than the one you have locally.

      Also, do not hesitate to check your live server for PHP error logs, but also the php-FPM logs if you have it activated.

      I hope that’ll help.

      Regards.

      Want to help WP Customer Area? It only takes few seconds!
      Rate & review the plugin on WordPress.org 🙂

Viewing 4 reply threads

You must be logged in to reply to this topic.