Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support asymmetric density #570

Closed
tresf opened this issue Feb 6, 2020 · 2 comments
Closed

Support asymmetric density #570

tresf opened this issue Feb 6, 2020 · 2 comments
Assignees
Milestone

Comments

@tresf
Copy link
Contributor

tresf commented Feb 6, 2020

Currently, when specifying density (e.g. { density: 300 }) QZ Tray will create a resolution of 300x300. However some printers, such as the Dymo Labelwriter 450 support a resolution of 300x600.

By leveraging the Windows print driver, it's possible to obtain this higher quality...

Note, this does slow printing considerably, but the output is undeniably better.

I would like to propose the following:

  • The ability for density to allow asymmetric density values
  • The ability for density to be triggered by qualitative keywords, e.g. "Best".
@akberenz
Copy link
Member

How do we want to go about supporting this in the api?

  • Take an array for [cross, feed] densities
    • { density: [300, 600] }
  • Take an object with cross and feed as the key names
    • { density: { cross: 300, feed: 600 } }
  • Add an additional config property for cross density, leaving 'density' as feed density
    • { crossDensity: 300, density: 600 }

And I'm assuming "best" would just go for the highest supported values of both? Are there other string keywords we'd want to support?

@tresf
Copy link
Contributor Author

tresf commented Feb 13, 2020

  1. { density: { cross: 300, feed: 600 } }

^--- This is the winner. I'll explain why...

  1. { density: [300, 600] }

This allows an array already, so it's used up already.

  1. { crossDensity: 300, density: 600 }

I think density: { density: ... } } is confusing.

And I'm assuming "best" would just go for the highest supported values of both?

Yes.

Are there other string keywords we'd want to support.

The most common I'm finding are:

  • BEST
  • NORMAL
  • DRAFT

We can probably infer BEST and DRAFT by choosing the highest and lowest values respectively, but I have no idea how to compute NORMAL. Since most drivers will ship with NORMAL as the default, perhaps we just support the prior and latter for now and then we can do a separate study at a later time (not in this PR) titled:

Issue #999: "what is NORMAL" density
Placeholder to sample a handful of drivers on various platforms to determine if there's a programmatic way to support NORMAL.

Even then, it may not be needed, most programmers know the DPI of their printer.

@tresf tresf closed this as completed in 439c7bc Apr 16, 2020
@tresf tresf added this to the 2.1.1 milestone Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants