Skip to content

Commit

Permalink
tweak(io): minor edits in +html2pdf
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jun 23, 2023
1 parent 9edfb5c commit c274a6c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions elisp/+io.el
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ If FORCE-P, overwrite the destination file if it exists, without confirmation."
(const wkhtmltopdf)
(const htmldoc)
(const weasyprint)
(const pandoc+context)))
(const pandoc+context)
(const pandoc)))

;;;###autoload
(defun +html2pdf (infile outfile &optional backend)
Expand All @@ -194,24 +195,24 @@ value of `+html2pdf-default-backend' is used."
(backend (or backend +html2pdf-default-backend))
(backend-command
(pcase backend
('weasyprint
(list "weasyprint"
('wkhtmltopdf
(list "wkhtmltopdf"
"--images" "--disable-javascript" "--enable-local-file-access"
"--encoding" "utf-8"
"--stylesheet" (expand-file-name "templates/weasyprint-pdf.css" minemacs-assets-dir)
infile outfile))
('htmldoc
(list "htmldoc"
"--charset" "utf-8"
"--bodyfont" "sans" "--textfont" "sans" "--headfootfont" "sans"
"--top" "10#mm" "--bottom" "10#mm" "--right" "10#mm" "--left" "10#mm"
"--fontsize" "11"
"--top" "50#mm" "--bottom" "50#mm" "--right" "50#mm" "--left" "50#mm"
"--fontsize" "10"
"--size" "a4"
"--continuous"
"--outfile" outfile infile))
('wkhtmltopdf
(list "wkhtmltopdf"
"--images" "--disable-javascript" "--enable-local-file-access"
('weasyprint
(list "weasyprint"
"--encoding" "utf-8"
"--stylesheet" (expand-file-name "templates/weasyprint-pdf.css" minemacs-assets-dir)
infile outfile))
('pandoc+context
(list "pandoc"
Expand Down

0 comments on commit c274a6c

Please sign in to comment.