Nginx Recipes: Converting from HTML and URLs to PDF and PS

  • Tutorial
To prepare the conversion from HTML and URL to PDF and PS, we need nginx itself , the htmldoc generator and the ngx_http_htmldoc_module plugin . (I gave links to my forks, because I made some changes that have not yet been crammed into the original repository. You can also use the ready-made image .)

To convert from HTML and URL to PDF and 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

Also popular now: