The removed fwrite was adding an unnecessary %PDF at the second line of the spoolfile. Some Acrobat Reader versions would refuse to open those files. The validation tool at https://www.pdf-online.com/osa/validate.aspx was also reporting errors.
Before this commit:
qwe@qwe:/var/spool/cups-pdf/SPOOL$ head -n 2 cups2pdf-8786
%PDF-1.5
%PDF%����
After:
qwe@qwe:/var/spool/cups-pdf/SPOOL$ head -n 2 cups2pdf-9002
%PDF-1.5
%����
The removed
fwrite
was adding an unnecessary%PDF
at the second line of the spoolfile. Some Acrobat Reader versions would refuse to open those files. The validation tool at https://www.pdf-online.com/osa/validate.aspx was also reporting errors.Before this commit:
After: