HTML printing/saving to pdf

The 1C:Enterprise developers forum

People who like this:0Yes/0No
Just came
Rating: 0
Joined: Jan 3, 2018


In our system we are using templates for emails. Users can paste their own html, we got previews (on forms using document field.HTML) etc . We using same templates for printing/creating pdfs (using FormattedDocuments). Everything works perfectly until we got tables (html <table> <td> <tr> tages) in this templates.

Previews still works (and sending emails too) but FormattedDocuments seems not to understand table tags and ignores them (so we can't print/pdfs). Is there any other way to printing and creating pdf's from html (spreadsheets maybe)? Or how to "force" formatting documents to create tables ?

We need printig/creating pdfs from html in users mode (saving dialogs etc) as well as in silent mode.

Thanks for help and sorry for my english;)

People who like this:0Yes/0No
Rating: 17
Joined: Dec 4, 2017

Dear Tomek,

Indeed, when printing a FormattedDocument's HTML-encoded content to PDF format, tables are lost. In this way, HTML tables are not supported in FormattedDocuments. This is a known limitation.

Alternatively, you can use a SpreadsheetDocument with tables and print its content to PDF format.

Best regards,
Vladimir Gurov

1C Company support team