Open dayglojago opened 5 months ago
Hi @dayglojago
For now, some PrintItem
cases let you define a print configuration. Perhaps all item types should support it, or perhaps the configuration should be passed into the print function instead?
However, string and attributed string lets you define a PDF page configuration, which currently lets you define page size and page margins.
I haven't experienced the subpar result you shared in the image, but I'm sure there are many caveats when it comes to printing on various printers. :|
Hi there!
I'm not sure if this is the correct forum for this question/issue, but I've been using PrintingKit in the same project referenced in issue #6, and after inspecting the code, it's not clear how to change the target text/paper size.
I'd also like to address the margins, because 1" margins on a 2.83" slice of paper is definitely not working :)
In my use case, I'm printing to a thermal receipt printer. The default paper size is 72 mm x 2000 mm or ~2.83" x ~78.74" (the length is basically infinity though, because it can go as long as there's paper left.) However, it seems that PrintingKit defaults to 8.5 x 11" paper, which creates this preview:
And this output:
As you can see, it does print, although perhaps with less readability than I was hoping. I was looking at maybe using the scale parameter, but I'm not sure that would help with my issues with—for example—overlarge margins.
I've scoured the documentation and the code; it's unclear that there are any other parameters to play around with other than scale. Are different paper sizes supported? Is there a way to set them? I just need the one! :)