Nginx Recipes: Convertendo de HTML e URLs para PDF e PS

Para preparar a conversão de HTML e URL para PDF e PS, precisamos do nginx , do gerador htmldoc e do plug- in ngx_http_htmldoc_module . (Forneci links para meus garfos, porque fiz algumas alterações que ainda não foram colocadas no repositório original. Você também pode usar a imagem pronta .)

Para converter de HTML e URL para PDF e PS
location =/file2pdf { file2pdf "file.html"; } #  FILE  PDF location =/file2ps { file2ps "file.html"; } #  FILE  PS location =/file2pdf { file2pdf "file1.html" "file2.html"; } #   FILE  PDF location =/file2ps { file2ps "file1.html" "file2.html"; } #   FILE  PS location =/html2pdf { html2pdf ", !"; } #  HTML  PDF location =/html2ps { html2ps ", !"; } #  HTML  PS location =/html2pdf { html2pdf ", !" " , !"; } #   HTML  PDF location =/html2ps { html2ps ", !" " , !"; } #   HTML  PS location =/url2pdf { url2pdf "https://google.com"; } #  URL  PDF location =/url2ps { url2ps "https://google.com"; } #  URL  PS location =/url2pdf { url2pdf "https://google.com" "https://google.ru"; } #   URL  PDF location =/url2ps { url2ps "https://google.com" "https://google.ru"; } #   URL  PS 

Source: https://habr.com/ru/post/pt458982/


All Articles