But I changed my mind and went back for yet another look at the Brother driver. It does have a custom page size section commented out. I've tried uncommenting it but that hasn't worked and I'm not sure it can work.
Originally Posted by Jon_Freeman
I could be wrong but as far as I can work things out:
CUPS uses /usr/lib/cups/filter/brother_lpdwrapper_ql710w which is a shell script.
This goes on to call the binary /opt/brother/PTouch/ql710w/cupswrapper/brcupsconfpt1 with a few parameters - Cups options, ppd file, etc.
As far as I can make out, this program a) validates the CUPs options and b) makes various settings to the printer making a series of calls to brprintconfpt1_ql710w eg.
If the media/page size is considered "invalid", brcupsconfpt1 falls back to the CUPs default size.
brprintconfpt1_ql710w -P ql710w -media "38x50" -rcfile "/tmp/brql710wrc_22740"
Looking at a run using a label I defined on glabels, the shell script sets the cups options to, eg.
MirrorPrint=OFF Priority=SPEED Trimtape=OFF Brightness=0 Contrast=0 media=Custom.107.72x141.73 CutAtEnd=ON number-up=1 CutLabel=1 Halftone=ERROR Feed=3 BrCompress=OFF job-uuid=urn:uuid:31b3b5c6-e308-3b36-616c-0f4028cb8076 job-originating-host-name=localhost time-at-creation=1456836157 time-at-processing=1456836157 Copies=1
There seems to be 2 problems here.
a) as that media size doesn't exist, brcupsconfpt1 uses the CUPS default
b) Even if brprintconfpt1_ql710w was willing to accept it, brprintconfpt1_ql710w only seems willing to set its media size a) to one of its built in sizes or b) a custom size added by brpapertoollpr_ql710w
I guess it would be intersting to see what happens if I could modify the shell script to set the cupsoption media to say "myMedia" and call brpapertoollpr_ql710w to add/change it's media type "myMedia" to use the custom dimensions. I'm not sure brprintconfpt1_ql710w would be able to modify the ppd at that stage though. That and it would take me ages to work out how to get the shell script to persom the string manipulations.