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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:39:06+00:00 2026-05-22T22:39:06+00:00

I am using html2pdf library in order to generate pdf from html file. I

  • 0

I am using html2pdf library in order to generate pdf from html file.

I don’t know how to check out width arrangements.

I had this library from source forge. If anyone has idea about it or manual about html2pdf?

  • 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-22T22:39:06+00:00Added an answer on May 22, 2026 at 10:39 pm

    I think what you are asking is how to change the page width of the outputted PDF file. The answer is to change the width in the settings before you call AddPage(). Here is an example of how to do so:
    Here are the settings you will need:
    Basically, it would look something like this:

    require("html2fpdf.php"); 
    $htmlFile = "http://www.cnn.com"; 
    $buffer = file_get_contents($htmlFile); 
    
    $pdf = new HTML2FPDF('P', 'mm', 'Legal'); 
    $pdf->AddPage(); 
    $pdf->WriteHTML($buffer); 
    $pdf->Output('my.pdf', 'F'); 
    

    This, if I am getting the code right, would output a PDF called my.pdf that is formatted as a legal-size page in portrait mode.

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

Sidebar

Related Questions

i am using html2pdf class to generate pdf. in my problem its generate pdf
Using Google Maps InfoBox - http://google-maps-utility-library-v3.googlecode.com/svn/trunk/infobox/docs/reference.html Currently the map will scroll - pan control
I was using this tutorial http://bakery.cakephp.org/articles/Casmo/2010/06/26/creating-pdf-files-with-html2ps-html2pdf to set up html2ps with cakePhp. Everything is
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
I'm using html2fpdf for creating PDF documents. Now once I have created that, I
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Background: I couldn't find any decent free HTML to PDF conversion utilities in C#.
Using the HTML5 <canvas> element, I would like to load an image file (PNG,
I'm using html2pdf and I want to get rid of the top and left

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.