Announcement

Collapse
No announcement yet.

PDF creation error with https

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • PDF creation error with https

    In the last changelog v8.0.016 - 11-06-2014 23:11 there was announced that the pdf creation error with https is solved - but I get still the 404 error.

    The configuration for the pdf server is: https://app.mydomain.com/

    The output of the generated log in tmp path is:

    http://https://app.mydomain.com/_lib/tmp/sc_app_gr....

    The statement starts with: http://https://..

    Has anyone got this running?

    Best regards,
    Manfred

  • #2
    Hello,

    The problem was solved, but I would like some information:

    You are accessing the application or directly from an application menu? (Or control)

    In case you are also using certificate (https)?

    For you to perform a test, please leave the field configuration server (production environment) empty. (PDF)

    Perform a test with this setup and verify that solve.

    It is recommended to use a menu or a control before accessing or access your grid application.

    Thank you!
    Best regards,
    Thomas Soares.
    ScriptCase International.

    Email: t.soares@scriptcase.net
    Visit our Blog: http://www.scriptcase.net/blog/
    Visit out fan page: http://www.facebook.com/Scriptcase

    Comment


    • #3
      Hello,

      we tried your suggestion - but no success.

      We access the application with https://subdomain.domain.com

      We access the grid with a menu.

      I changed the configuration for the production environment and left the pdf-server-field empty.

      But I get still the same error - looks like the pdf is created - but when we click open we get a 404 error.

      ScriptCase Prod: 8.0.018
      In the diagnosis.php I get an error on:
      - Zend
      - ZendId execute Permission
      Do I need this to create an PDF?

      Do you have any further instructions for me?
      Any help would be great.

      Comment


      • #4
        Hello,

        I will discuss this issue with our team.

        regards,
        Bernhard Bernsmann

        Comment


        • #5
          Hello,

          Give me some information please:

          You need to run the generated file .log, this file can be found in the /tmp folder.
          The command must be run starting folder /prod/third/wkhtmltopdf/linux-amd64 or /prod/third/wkhtmltopdf/linux-i386, the platform depends on your operating system. (32 bit or 64 bit)

          - You need to access your terminal server via SSH (shell)
          - Go to the wkhtmltopdf folder in your production environment, ( /prod/third/wkhtmltopdf/linux-i386 or /prod/third/wkhtmltopdf/linux-amd64)
          - Run the command generated in the file .log on tmp folder and check the error is occurring.

          Ej.: ./wkhtmltopdf-i386 --page-size A4 --orientation Portrait --header-right "[page]" --javascript-delay 250 http://mydomain/prod/_lib/tmp/sc_gri...hdlp7dap6.html /var/www/prod/_lib/tmp/sc_pdf_20130206463058_196_grid.pdf

          - Starting this error we can make a better diagnosis of your environment, and come at a solution.

          (All steps should be performed via terminal.)

          Thank you.
          Best regards,
          Thomas Soares.
          ScriptCase International.

          Email: t.soares@scriptcase.net
          Visit our Blog: http://www.scriptcase.net/blog/
          Visit out fan page: http://www.facebook.com/Scriptcase

          Comment


          • #6
            Thomas,
            I am getting a similar problem with the PDF file creation. Using SSH ,I tried the file creation command from the log file. I got the Error:failed to load page http:///.....
            Can you help with this ?

            Thanks,
            Ken

            Comment


            • #7
              Hello Thomas,

              this is the response from the shell:

              (07:51:07) [linux-amd64] ./wkhtmltopdf-amd64 --page-size Letter --orientation Portrait --outline-depth 0 --header-right "[page]" --javascript-delay 2000 http://app.webcrm.at/_lib/tmp/sc_app...e03a2e69e.html /customer/56322/app/proddir/_lib/tmp/sc_pdf_20141124074523_517_app_rep_telefonliste.pdf
              PROT_EXEC|PROT_WRITE failed.
              (07:51:30) [linux-amd64]

              1. Everything is called with http:// not with https://
              2. Error from shell: PROT_EXEC|PROT_WRITE failed.

              Thank you.

              Best regards,
              Manfred

              Comment


              • #8
                elbsdev,
                Your error can be resolved by assigning the execute and write privileges to the folders where the pdf is getting generated. It is more of a privilege issue.

                After much research, I found out that my error was related to how pages are rendered on the Chrome browser. Apparently HTML-to-PDF convertor wkhtmltopdf, uses WebKit (the same as Google Chrome) and there is some kind of conflict at rendering the pages. If I set the hardware acceleration on the Chrome browser, then the pages are rendered correctly.

                Hopefully this will help someone who is encountering similar pdf issues.

                Comment


                • #9
                  Originally posted by edbsdev View Post
                  ./wkhtmltopdf-amd64 --page-size Letter --orientation Portrait --outline-depth 0 --header-right "[page]" --javascript-delay 2000 http://app.webcrm.at/_lib/tmp/sc_app...e03a2e69e.html /customer/56322/app/proddir/_lib/tmp/sc_pdf_20141124074523_517_app_rep_telefonliste.pdf

                  Generating http:// or for that matter, https:// in the command line is absolutely wrong. It is on the same server. It should be the absolute file path. Forcing http:// breaks two things:

                  1. If the web server is configured with Strict Transport Security (as is common with web applications) then http:// will fail.

                  2. If the webserver is behind a DMZ or otherwise does not have public DNS access, then the DNS lookup (which is unnecessary work caused by using a url) will fail.

                  NetMake: Simply use a file path in the generated wkhtmltopdf command line, instead of a url. Problem solved. A year ago I reported this. Still no response from NetMake.

                  I really think that nobody at NetMake has even a basic understanding of SSL.
                  Looking at their website (where you enter credit card information to buy ScriptCase) it is rated "F" from SSL Labs click here for test results

                  Dave

                  P.S., You may want to test your own website (or your bank's for that matter): just enter the URL at www.ssllabs.com
                  Last edited by daveprue; 03-07-2015, 03:38 AM.
                  Dave Prue
                  Code Whisperer
                  Lahar International Corp
                  www.lahar.net

                  Comment

                  Working...
                  X