-
Notifications
You must be signed in to change notification settings - Fork 276
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
Rasterize HTML, PDFs to Raw #19
Comments
Do we need to subset these new formats? As pdf, html, and image each have their own formats when used independantly. And this has even led to some confusion already, causing #70. |
From our discussion, this will be an expansion of the API. var data =
['^XA', {
type: 'raw', format: 'image', flavor: 'file', data: 'assets/img/image_sample_bw.png',
options: { language: "ZPL" }
}, '^XZ']; |
Feature added in 9c39650 |
Looks pretty good. In the case of the PDF, it only takes up about 2/3rds of the height and width of a 4x6 label. How do you suggest we specify PDF size? HTML I had a bit more control over due to the Also, I think it may be time to add a radio button for the language type so that we can quickly switch between (e.g.) ESCP, ZPL and EPL. |
Do you want to extend the
|
Sounds like a good plan. (bug was closed in error, please ignore) |
Adjusted with 5e7afd0 |
For the new sample page, let's specify the following:
ESCP is the one I'm not too sure about. I know we use Also, no need to show Last, they should both default to zero. |
Some testing:
Any idea why the smaller PDF is printed so small? pdf_sample.pdf
fourbysix.pdf
|
Looks like I never had the pdf scale when the size was set.. |
@bberenz is there a good reason why the pageWidth and pageHeight are in pixels rather than units? Edit: Probably because we aren't sure of the printer DPI, huh? |
Because we don't take in a |
So, I've tested this.
The printable area seems to be slightly under 812 (203 * 4), so adjusting this to 800 seems to fix this in the right direction.
This looks good. We can open separate bug reports as needed. Closed via 9c39650 5e7afd0. This feature will be available in 2.1. |
After supporting the 2.0 branch for a couple months, we've noticed an increasing amount of people trying to use Pixel printing against their raw devices for some specific cases, such as a packing slip (something that FedEx or UPS may not provide in raw format) or printing continuous feed image data (HTML) to a receipt printer.
Today, they're trying to print using the 2d printing (HTML, etc), but this often requires them to utilize a different device driver and worse, actually yields different results versus just using raw ZPL, EPL, ESCP, etc.
This enhancement is to allow raw printing to use Pixel features such as HTML, PDF, but then wrap them to the raw equivalent.
Since we have the ability to rasterize PDF and HTML, there's no reason why we can't support these formats for raw printers too by rendering them, treating them as raster graphics, and then converting them to raw commands.
The text was updated successfully, but these errors were encountered: