After converting spreadsheet html file to PDF some text is squished together.

27 views
Skip to first unread message

Ryan

unread,
Jun 8, 2016, 4:40:42 PM6/8/16
to PDFTron PDFNet SDK
Question:

I have a table in HTML format, and when I convert to PDF using HTML2PDF module, some of the text is too close together. How can I improve this?

We create the HTML file, so we can modify it.

Answer:

First, you should make sure landspace mode is enabled.

HTML2PDF.SetLanscape(true)


Then you can do the rest via CSS, both increasing the font size, but also ensuring there is no negative letter-spacing being applied. 

You can also use the @media print to separate CSS for screen versus print. If you do this, then be sure to set HTML2PDF to use print media mode (default is screen)

HTML2PDF.WebPageSettings.SetPrintMediaType(true)



Reply all
Reply to author
Forward
0 new messages