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

Initial page size support #1148

Merged
merged 5 commits into from
Sep 12, 2023
Merged

Initial page size support #1148

merged 5 commits into from
Sep 12, 2023

Conversation

tresf
Copy link
Contributor

@tresf tresf commented Jun 25, 2023

Adds page size information to qz.printers.details()

TODO:

  • Test on Windows, Mac, Linux
  • Measure the time impact on a large list of printers
image

Closes #1121

@tresf tresf requested a review from akberenz June 26, 2023 06:31
@akberenz
Copy link
Member

Can I suggest a change to the json structure for this? I don't like that we're adding two objects for every one size.
And I see we're also getting the size's name during this, so why not include it?

sizes: [
  {
    name: "iso-a4",
    inches: { width: 8.267716407775879, height: 11.692913055419922},
    millimeters: { width: 210, height: 297 }
  },
  {
    name: "na-letter",
    inches: { width: 8.5, height: 11 },
    millimeters: { width: 215.89999389648438, height: 279.3999938964844 }
  },
  // ... etc
]

@tresf
Copy link
Contributor Author

tresf commented Jun 28, 2023

Do you know how to get the name?

@akberenz
Copy link
Member

In the custom hashset's add function, should be able to call toString on the MediaSizeName object (or alternatively mediaSizeName.getStringTable()[mediaSizeName.getValue()] if we want a more robust way of getting it)

@tresf

This comment was marked as outdated.

@tresf

This comment was marked as outdated.

@tresf
Copy link
Contributor Author

tresf commented Jun 29, 2023

Updated:

MacOS:
image

@tresf
Copy link
Contributor Author

tresf commented Jun 29, 2023

Ubuntu 20.04:

image

@tresf
Copy link
Contributor Author

tresf commented Jun 29, 2023

Windows 11:

image

@tresf
Copy link
Contributor Author

tresf commented Sep 12, 2023

Windows Server 2012 with 1,402 printers shows no significant delay when page size is added.

@tresf tresf merged commit 4024f22 into master Sep 12, 2023
12 checks passed
@tresf tresf deleted the sizes branch September 12, 2023 21:04
@tresf
Copy link
Contributor Author

tresf commented Oct 20, 2023

In the custom hashset's add function, should be able to call toString on the MediaSizeName object (or alternatively mediaSizeName.getStringTable()[mediaSizeName.getValue()] if we want a more robust way of getting it)

Ok, in Ubuntu, I have a case where this toString() is misbehaving, but choiceName is OK:

image

@tresf
Copy link
Contributor Author

tresf commented Oct 20, 2023

Ok, in Ubuntu, I have a case where this toString() is misbehaving, but choiceName is OK:

Filed a dedicated bug report: #1197

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

Successfully merging this pull request may close these issues.

Getting Printer Page Sizes
2 participants