Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8622957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:10:25+00:00 2026-06-12T07:10:25+00:00

Im calling wkhtmltopdf from PHP like this: `$commandString = ‘ ../wkhtmltopdf/wkhtmltopdf-amd64 –header-html ‘. $_SESSION[‘ER_HlavniLink’]

  • 0

Im calling wkhtmltopdf from PHP like this:

`$commandString = '

"../wkhtmltopdf/wkhtmltopdf-amd64" 

--header-html '. $_SESSION['ER_HlavniLink'] .'/export_pdf/header31.php?IDstavba='.$IDstavba.' 

--header-spacing 0 

--footer-line 

--footer-spacing 5 

--footer-left "Vygenerováno pomocí webové aplikace www.estiroad.cz" 

--footer-center "[page] / [toPage]" 

--orientation Landscape 

--user-style-sheet "../css/export.css" 

--print-media-type 

--page-size A4 

--encoding utf-8

--margin-top 50mm

--margin-bottom 15mm

--margin-left 10mm 

--margin-right 10mm 

'.$_SESSION['ER_HlavniLink'].'/'.$export.' '.$nazev_sestavy;`

If I want to add a parameter in the header file call, browser shows me error: Loading of PDF document failed… Can I somehow solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T07:10:26+00:00Added an answer on June 12, 2026 at 7:10 am

    Based on the comments, I suggest adding double quotes around the –header-html value given. I didn’t catch that on the first testing round so thanks to your question, this might help:

    This command works:

    wkhtmltopdf.exe --header-html "https://www.google.fi/search?hl=fi&site=&source=hp&q=test&oq=test&gs_l=hp.12..0l10.2413.2773.0.4395.4.4.0.0.0.0.80.232.4.4.0...0.0...1c.1.k_PQAqelc9w" --header-spacing 0 --footer-line --footer-spacing 5 --footer-left "Vygenerováno pomocí webové aplikace www.estiroad.cz" --footer-center "[page] / [toPage]" --orientation Landscape --user-style-sheet test.css --print-media-type --page-size A4 --encoding utf-8 --margin-top 50mm --margin-bottom 15mm --margin-left 10mm --margin-right 10mm http://www.google.com/ g2.pdf && g2.pdf
    

    This does not (Notice that there are no quotes around the address given to –header-html

    wkhtmltopdf.exe --header-html https://www.google.fi/search?hl=fi&site=&source=hp&q=test&oq=test&gs_l=hp.12..0l10.2413.2773.0.4395.4.4.0.0.0.0.80.232.4.4.0...0.0...1c.1.k_PQAqelc9w --header-spacing 0 --footer-line --footer-spacing 5 --footer-left "Vygenerováno pomocí webové aplikace www.estiroad.cz" --footer-center "[page] / [toPage]" --orientation Landscape --user-style-sheet test.css --print-media-type --page-size A4 --encoding utf-8 --margin-top 50mm --margin-bottom 15mm --margin-left 10mm --margin-right 10mm http://www.google.com/ g2.pdf && g2.pdf
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Calling Html.RenderPartial(~/Views/Payments/MyControl.ascx); from a view works if MyControl.ascx is a control that directly inherits
Calling index.php?pConta=1&pDataInicial=01-01-2000&pDataFinal=31-12-2000 I get this notices: [08-Oct-2009 17:30:35] PHP Notice: Undefined index: pConta in
Calling all the PHP helpers out there. So basically I would like to give
Calling __construct() function from __destruct(), <?php public function __construct() { echo Hi; } public
Calling the WriteObject Method from a background thread is not possible! Is there a
Calling getActionBar returns null . This has been frequently reported so I've made sure
Calling urrlib2.urlopen on a link to an article fetched from an RSS feed leads
While calling from my Web Application, WCF response i am getting is : <s:Envelope
Am calling a webservice from my jQuery to fetch both Staff and Student details.
Calling a Lua function from C is fairly straight forward but is there a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.