text_templates::create_pdf_from_html (public)
text_templates::create_pdf_from_html -html_content html_content
Defined in packages/acs-tcl/tcl/pdf-procs.tcl
The HTML Content is transformed into a PDF file
- Switches:
- -html_content
(required)- HTML Content that is transformed into PDF
- Returns:
- filename of the pdf file
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set fp [file tempfile tmp_html_filename [ad_tmpdir]/pdf-XXXXXX.html] puts $fp $html_content close $fp # create pdf-file set tmp_pdf_filename "${tmp_html_filename}.pdf" set htmldoc_bin [parameter::get -parameter "HtmlDocBin" -default "/usr/bin/htmldoc"] if {[catch {exec $htmldoc_bin --webpage --quiet -t pdf -f $tmp_pdf_filename $tmp_html_filename} err]} { ns_log Error "Error during conversion from html to pdf: $err" } if {[ad_file exists $tmp_pdf_filename]} { return $tmp_pdf_filename } else { return "" }XQL Not present: Generic, PostgreSQL, Oracle