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

There's loads of choices for .ico files but I can't see any logic in
I thought there was something in GExperts to do this, but I can't see
As you can see this is a question from a non web developer. I
hope someone can help. I appreciate there are a few questions that are similar
I can see some options available: 1) Use PEAR's POP3 class --> tried it,
I can see in the postgresql logs that certain simple queries (no joins and
Picture this: you are creating a little module that people can incorporate into their
Hopefully this question won't be too convoluted or vague. I know what I want
I can see people asking all the time whether multiple inheritance should be included
We can see in a directory files ordered by Name in Windows Explorer. If

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.