]> git.ipfire.org Git - thirdparty/cups-filters.git/commit
cupsfilters: Make bannertopdf() work without environment variables
authorTill Kamppeter <till.kamppeter@gmail.com>
Mon, 21 Mar 2022 20:00:24 +0000 (21:00 +0100)
committerTill Kamppeter <till.kamppeter@gmail.com>
Mon, 21 Mar 2022 20:00:24 +0000 (21:00 +0100)
commit3b80c89c7e72401bcf0d1bc64ada1322e9ed6bad
tree0ac907113ee2889390f39dbcab27f166c2f5ef4d
parent60ed1fa00242035b60b841c22da399536852309f
cupsfilters: Make bannertopdf() work without environment variables

bannertopdf() uses CUPS' environment variables to determine the
template file directory, and the printer description (info) and
location entries. To make it easier to use this filter function also
without CUPS, the directory is now supplied as a string pointed at by
the parameters pointer and the printer description and location fields
via the "printer-info" and "printer-location" options or IPP
attributes.

In addition fixed several bugs:

- Free options list correctly
- Free templates file field in banner data structure correctly
- Handle a missing template PDF file correctly, without crash
cupsfilters/bannertopdf.c
cupsfilters/filter.h
cupsfilters/pdf.cxx
filter/bannertopdf.c