How can I automate HTML-to-PDF conversions?

后端 未结 14 866
攒了一身酷
攒了一身酷 2020-12-23 19:29

I\'ve been using htmldoc for a while, but I\'ve run into some fairly serious limitations. I need the end solution to work on a Linux box. I\'ll be calling this library/utili

14条回答
  •  南方客
    南方客 (楼主)
    2020-12-23 20:19

    I have found Electroshot to be supportive of modern CSS features, particularly layout. This was after struggling with wkhtmltopdf showing its age in not supporting things like CSS3.

    From Electroshot's features description:

    Electroshot uses Electron, which offers the most recent stable version of Chrome (rather than one from years ago); this means that pages render as they would in a browser...

    I've been able to use Bootstrap 4 to design a page, and then use Electroshot to render a PDF very closely resembling the HTML/CSS.

提交回复
热议问题