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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:33:14+00:00 2026-05-20T08:33:14+00:00

I can see there are a few options for doing this. My question is

  • 0

I can see there are a few options for doing this. My question is does any one know of a way that I can simply pass a php web page into a pdf creator and it outputs exactly the same as if it was viewed via a browser? Taking into consideration CSS, images and php functions etc.

Thanks

  • 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-05-20T08:33:15+00:00Added an answer on May 20, 2026 at 8:33 am

    Think wkhtmltopdf is the answer you are looking for as it uses WebKit to render the webpage just like it would look in a browser and then converts it to a PDF. This saves you writing a load of PHP code to organise the layout of your PDF.

    Details from their site:

    Simple shell utility to convert html
    to pdf using the webkit rendering
    engine, and qt.

    Searching the web, I have found
    several command line tools that allow
    you to convert a HTML-document to a
    PDF-document, however they all seem to
    use their own, and rather incomplete
    rendering engine, resulting in poor
    quality. Recently QT 4.4 was released
    with a WebKit widget (WebKit is the
    engine of Apples Safari, which is a
    fork of the KDE KHtml), and making a
    good tool became very easy.

    • Convert web pages into PDF documents using webkit
    • Adding headers and footers (static version only)
    • TOC generation (static version only)
    • Batch mode conversions
    • (Linux) No longer requires an XServer to be running (however the X11
      client libs must be installed)

    For code and more information on wkhtmltopdf integration with PHP see https://github.com/aur1mas/Wkhtmltopdf

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

Sidebar

Related Questions

My apologies if this question has been asked before. I can see there are
Here is the code relevant to my question: http://jsfiddle.net/mkerny45/V23NK/ As you can see there
In the android we can see that there is a default google search on
I'm currently playing with C, C++ and ASM. I can see that there's always
Hi I'm looking but can't see Is there a way to change the caption
Have seen multiple posts on this but I can't see any which answer my
First of all, I know there are a few other StackOverflow questions about this
I can see there are a lot of questions for getting the number of
I can see there are many ways to use jQuery safely in the javascript
By @user.posts , I can see there is a post with :unfinished status. But

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.