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 9015733
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:49:28+00:00 2026-06-16T03:49:28+00:00

I’m generating PDFs with wkhtmltopdf , which is awesome. However, sometimes the tool returns

  • 0

I’m generating PDFs with wkhtmltopdf, which is awesome. However, sometimes the tool returns exit codes, but in a lot of cases, the PDF still seems to be generated properly.

How do I really know that wkhtmltopdf failed to do the job?

Examples:

http://www.egresadoutec.edu.sv/boletin_pdf_create.php?idbXwt=101 gives a 404, but in fact the whole page was created properly (albeit 12Mb).
http://www.anarchia.com/link_in_frame.php?link=7243 gives a 404 and indeed nothing was generated, but the file size is NOT 0

  • 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-16T03:49:29+00:00Added an answer on June 16, 2026 at 3:49 am

    This is a very complicated issue actually. I sometimes want 404/500/503 pages to be rendered into a PDF normally. So what should the exit code then be? I think the exit code should be something like 2 just to inform me of what HTTP code the page returned but I still really do need the PDF to be rendered normally. I suspect that your actual issue is with the reasons for exit codes not being documented clearly, which is indeed true.

    I created an issue for this, but Antialize is a busy man so he might not have time for issues like this. I actually suspect that you are calling wkhtmltopdf from some wrapper you have created yourself and you are checking the exit code there. If you don’t want a PDF produced if a URL returns something other than HTTP 2xx, I suggest that you check the URL yourself before calling wkhtmltopdf. Create a tool or use an exiting one to call that URL and check it’s response. Not very expensive, simple and it might work for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a French site that I want to parse, but am running into
I'm interested in microtypography issues on the web. I want a tool to fix:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have an autohotkey script which looks up a word in a bilingual dictionary
This could be a duplicate question, but I have no idea what search terms

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.