Results 1 to 4 of 4

Thread: Dompdf and landscape mode

  1. #1
    Join Date
    Aug 2009
    Posts
    57

    Dompdf and landscape mode

    I am using dompdf with out any worries. But the problem is I am not able to generate a pdf in landscape mode. Does any one of you have an idea? Is there anyone who have used this software and would like to suggest me a way to do this?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Dompdf and landscape mode

    Code:
    $html = "<html><head><title>my html</title></head><body>foo</body></html>"; 
    $dompdf = new DOMPDF(); 
    $dompdf->load_html($html); 
    $dompdf->set_paper("a4", "landscape" ); 
    $dompdf->render(); 
        
    $dompdf->stream("mail.pdf" );

    That's all and to put in portrait :
    Code:
    $dompdf->set_paper("a4", "portrait" );

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: Dompdf and landscape mode

    I'm trying desperately to install dompdf. Can you help me?

    - I install the dompdf folder on the root of my site (more precisely in a subfolder for testing). I put all rights on this issue.

    But then what? What we put on the page + for a link to generate the pdf? I'm looking everywhere on the web but do not found any solution. And on the official site, I do not understand.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Dompdf and landscape mode

    That is indicated in the header file dompdf.php:

    /**
    * Display command line usage:
    *
    * Usage: ./dompdf.php [options] html_file
    *
    * html_file can be a filename, a url if fopen_wrappers are enabled, or the '-'
    * character to read from standard input.
    *
    * Options:
    * -h Show this message
    * -l list available paper sizes
    * -p size paper size; something like 'letter', 'A4', 'legal', etc. The default is
    * 'letter'
    * -o orientation either 'portrait' or 'landscape'. Default is 'portrait'.
    * -b path set the 'document root' of the html_file. Relative urls (for
    * stylesheets) are resolved using this directory. Default is the
    * directory of html_file.
    * -f file the output filename. Default is the input [html_file].pdf.
    * -v verbose: display html parsing warnings and file not found errors.
    * -d very verbose: display oodles of debugging output: every frame in the
    * tree is printed to stdout.
    *
    *
    */

Similar Threads

  1. How to set Landscape Keyboard mode only in iPhone 4
    By Micro-Dona in forum Portable Devices
    Replies: 2
    Last Post: 24-05-2012, 06:41 PM
  2. landscape mode don't work on iphone
    By Juaquine in forum Portable Devices
    Replies: 3
    Last Post: 05-12-2009, 05:25 PM
  3. How to print a webpage in landscape mode?
    By gazwsx in forum Technology & Internet
    Replies: 5
    Last Post: 10-07-2009, 06:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,302,177.39101 seconds with 17 queries