Open wkuss opened 3 months ago
@wkuss hi, I ran into a similar problem, my solution was to add the following three lines right to the end of the encode_dict
function:
if isinstance(data.get("data"), bytes):
encoded += data['data']
encoded += struct.pack(">b", IppTag.END.value)
ipptool generates the contents of http packets similarly. This is probably not the best solution, so I would wait for the author's comments.
In general, as it turned out, there are lines of code necessary for printing in the source files, the functionality was added as part of PR #510, which was adopted after the last release.
@ctalkington Is there an opportunity to make a new release? This functionality would be useful :)
Yeah, that's how I worked it out.
In pyipp's serializer.py, the encode_dict function does not handle the data attribute in data, resulting in file data not being sent to the Print device at print-job.
pyipp version: 0.16.0