Results 1 to 8 of 8

Thread: Convert HTML to PDF

  1. #1
    Join Date
    Jul 2009
    Location
    United States
    Posts
    26

    Default Convert HTML to PDF

    Trying to find converter to convert HTML to PDF. Currently use a Windows utility and the speed is just not that great. The actual files to be converted reside on and openSUSE 12.2 server and we convert them on a Windows workstation running Apache. What is the best one that could be run on the server and called from the webserver? I've heard of wkhtmltopdf but can't seem to get that installed or downloaded... Any suggestions would be appreciated. Not heavy on graphics (as in no pictures) other than lines on a typed page....

  2. #2
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Convert HTML to PDF

    Quote Originally Posted by jpeteet View Post
    Trying to find converter to convert HTML to PDF. Currently use a Windows utility and the speed is just not that great. The actual files to be converted reside on and openSUSE 12.2 server and we convert them on a Windows workstation running Apache. What is the best one that could be run on the server and called from the webserver? I've heard of wkhtmltopdf but can't seem to get that installed or downloaded... Any suggestions would be appreciated. Not heavy on graphics (as in no pictures) other than lines on a typed page....
    try wkhtmltopdf
    https://software.opensuse.org/package/wkhtmltopdf
    see it's homepage for faq/info
    http://wkhtmltopdf.org/index.html

    why can't you get wkhtmltopdf?
    ah man you're running 12.2 and that's been unsuported for a long time
    you can build it yourself, as I think wkhtnmltopdf needs a particular Qt version
    or maybe try the CentOS 5 version from here
    http://wkhtmltopdf.org/downloads.html
    the author wrote that his builds are static and should not depend on system libraries but..

  3. #3
    Join Date
    Jun 2009
    Location
    Mangfall, Germany
    Posts
    1,500

    Default Re: Convert HTML to PDF

    another way,

    open *.htm or *.html in Firefox

    then from the menu bar select
    - Print
    -- General (tab)
    --- Print to File (under Printer)
    ---- PDF (Output format: Button)

    then type Name:
    Save in folder:

    then finally select Print

  4. #4
    Join Date
    Jul 2009
    Location
    United States
    Posts
    26

    Default Re: Convert HTML to PDF

    Quote Originally Posted by keellambert View Post
    another way,

    open *.htm or *.html in Firefox

    then from the menu bar select
    - Print
    -- General (tab)
    --- Print to File (under Printer)
    ---- PDF (Output format: Button)

    then type Name:
    Save in folder:

    then finally select Print
    Thank you for the suggestion but it will be something that I need to automate as these documents will be getting created all day and no one will physically be sitting there and doing it.....

  5. #5
    Join Date
    Jul 2009
    Location
    United States
    Posts
    26

    Default Re: Convert HTML to PDF

    Quote Originally Posted by I_A View Post
    try wkhtmltopdf
    https://software.opensuse.org/package/wkhtmltopdf
    see it's homepage for faq/info
    why can't you get wkhtmltopdf?
    ah man you're running 12.2 and that's been unsuported for a long time
    you can build it yourself, as I think wkhtnmltopdf needs a particular Qt version
    or maybe try the CentOS 5 version from here
    http://wkhtmltopdf.org/downloads.html
    the author wrote that his builds are static and should not depend on system libraries but..


    I can't even seem to download it from my openSUSE 13.2 server......

  6. #6
    Join Date
    Jul 2009
    Location
    United States
    Posts
    26

    Default Re: Convert HTML to PDF

    I know I need to get off of 12.2, it is my largest and most used production server....Even just for the security parts... My biggest problem is we use MySQL and with the later versions of the OS they are pushing/moving to Maria DB. That would create a whole new set of config changes etc...right?

  7. #7
    Join Date
    Sep 2008
    Posts
    2,997

    Default Re: Convert HTML to PDF

    Quote Originally Posted by jpeteet View Post
    I can't even seem to download it from my openSUSE 13.2 server......
    there wore some issues with software.opensuse.org. here's a copy paste for 13.2
    you need to add the Publishing repository and install wkhtmltopdf

    Code:
    sudo zypper ar http://download.opensuse.org/repositories/Publishing/openSUSE_13.2/Publishing.repo
    sudo zypper in wkhtmltopdf
    that's it
    here's a direct link to the srcrpm if you want to re-build it under 12.2
    http://download.opensuse.org/reposit....1-2.2.src.rpm

    how to do it?
    you'd need to have a lot of devel packages installed read the readme in the source
    then install it as an ordinary user with rpm (not as root!)
    Code:
    rpm -i http://download.opensuse.org/repositories/Publishing/openSUSE_13.2/src/wkhtmltopdf-0.12.1-2.2.src.rpm
    then go to the RPMS folder in your home, go to the specs subfolder and execute
    rpmbuild -bb wkhtmltopdf.spec
    if everything went fine you'll find an installable binary 12.2 rpm in the i686 or x64 subfolder.
    for more info about rpmbuild try man rpmbuild or info rpmbuild

  8. #8
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,063

    Default Re: Convert HTML to PDF

    On Fri, 24 Jul 2015 15:26:02 +0000, jpeteet wrote:

    > keellambert;2720778 Wrote:
    >> another way,
    >>
    >> open *.htm or *.html in Firefox
    >>
    >> then from the menu bar select - Print -- General (tab)
    >> --- Print to File (under Printer)
    >> ---- PDF (Output format: Button)
    >>
    >> then type Name:
    >> Save in folder:
    >>
    >> then finally select Print

    >
    > Thank you for the suggestion but it will be something that I need to
    > automate as these documents will be getting created all day and no one
    > will physically be sitting there and doing it.....


    A lot of the output depends on the rendering engine used - so results
    will likely vary.

    How much control do you have over the source documents that generate
    these outputs?

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •