{"action":"created","issue":{"url":"https://api.github.com/repos/qzind/tray/issues/92","repository_url":"https://api.github.com/repos/qzind/tray","labels_url":"https://api.github.com/repos/qzind/tray/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/qzind/tray/issues/92/comments","events_url":"https://api.github.com/repos/qzind/tray/issues/92/events","html_url":"https://github.com/qzind/tray/issues/92","id":170040746,"number":92,"title":"Using \"Scale Content\" in 2.0.1 breaks density logic","user":{"login":"lite1979","id":3408749,"avatar_url":"https://avatars.githubusercontent.com/u/3408749?v=3","gravatar_id":"","url":"https://api.github.com/users/lite1979","html_url":"https://github.com/lite1979","followers_url":"https://api.github.com/users/lite1979/followers","following_url":"https://api.github.com/users/lite1979/following{/other_user}","gists_url":"https://api.github.com/users/lite1979/gists{/gist_id}","starred_url":"https://api.github.com/users/lite1979/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lite1979/subscriptions","organizations_url":"https://api.github.com/users/lite1979/orgs","repos_url":"https://api.github.com/users/lite1979/repos","events_url":"https://api.github.com/users/lite1979/events{/privacy}","received_events_url":"https://api.github.com/users/lite1979/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-08T22:27:24Z","updated_at":"2016-08-09T02:08:37Z","closed_at":null,"body":"Using either Ubuntu 14.04 or Linux Mint 17.3\r\n\r\nIn comparison with 2.0.0, pixel printing is mostly broken for thermal receipt (continuous paper) printers when using 'scale content'. Not using 'scale content' results in undesirable images being printed.\r\n\r\nUsing a zebra label printer, however, results are identical to the previous code.\r\n\r\nStack trace showed \"no usable DPI\" for my star printer, which makes me think it's related to either the conversion, or how it reads the default dpi of the printer. I'll add a stack trace from my other machine in a few minutes.\r\n\r\nForcing a DPI of 72 gave me a more usable image, both with and without enabling scale content.\r\n\r\n\r\n[debug.txt](https://github.com/qzind/tray/files/407873/debug.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/qzind/tray/issues/comments/238433384","html_url":"https://github.com/qzind/tray/issues/92#issuecomment-238433384","issue_url":"https://api.github.com/repos/qzind/tray/issues/92","id":238433384,"user":{"login":"tresf","id":6345473,"avatar_url":"https://avatars.githubusercontent.com/u/6345473?v=3","gravatar_id":"","url":"https://api.github.com/users/tresf","html_url":"https://github.com/tresf","followers_url":"https://api.github.com/users/tresf/followers","following_url":"https://api.github.com/users/tresf/following{/other_user}","gists_url":"https://api.github.com/users/tresf/gists{/gist_id}","starred_url":"https://api.github.com/users/tresf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tresf/subscriptions","organizations_url":"https://api.github.com/users/tresf/orgs","repos_url":"https://api.github.com/users/tresf/repos","events_url":"https://api.github.com/users/tresf/events{/privacy}","received_events_url":"https://api.github.com/users/tresf/received_events","type":"User","site_admin":false},"created_at":"2016-08-09T02:08:37Z","updated_at":"2016-08-09T02:08:37Z","body":"The logs suggest the DPI couldn't be retrieved from the Epson and the Star printer.   The output of `lpoptions -p [PRINTER_NAME] -l` should explain a bit more why the DPIs can't be detected.\r\n\r\nFor most printers, something like this is returned: `Resolution/Output Resolution: 150dpi *300dpi 600dpi 1200dpi 2400dpi`, with `*300dpi` being the default resolution.  This is working for the Zebra driver as it selects `*203` but we haven't tested this on Epson or Star yet.\r\n\r\nAnother way to circumvent the PDF scaling issues is to use the `rasterize: false` flag (or the checkbox in sample.html) as it should allow PDFBOX to do the scaling for you although this feature won't be available for HTML until 2.1.\r\n\r\nAFAIK, the only major change to this logic was adding the `fallbackDensity` support via https://github.com/qzind/tray/commit/fe38f7ca02799f8ccdc1431378e7ee4534f4a40f and I don't see anything in it that should have made this impact.  Is there a chance this wasn't tested with these same settings in 2.0.0?\r\n\r\nAlso curious if @bberenz has any thoughts.\r\n\r\nCurrently, we fallback to 600dpi if non was detected."}}
{"actor":{"display_login":"tresf"}}