The weird issues and workarounds we sometimes have to deal with
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)
Then add all the fun you can have with Zebra label printers. X|
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
-
Then add all the fun you can have with Zebra label printers. X|
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
That's why I use Avery label sheets and run 'em through my laser printer.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Then add all the fun you can have with Zebra label printers. X|
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)
the paragraph would be so much easier to read, if you split it after every 3-4 lines/sentences. Just a suggestion. :)
-
the paragraph would be so much easier to read, if you split it after every 3-4 lines/sentences. Just a suggestion. :)
-
Thank you. I was going to delete my post because I realized how much of a jerk I sounded after re-reading it. I will edit the OP to be more civilized. :-O
-
Thank you. I was going to delete my post because I realized how much of a jerk I sounded after re-reading it. I will edit the OP to be more civilized. :-O
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)
As soon as someone mentions PDF I start to panic X| For a standard it's incredibly difficult and tooling is sparse or expensive. Recently went the wkhtmltopdf route too.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)
I tend to use a barcode font when I want to generate a barcode. It means that I need to calculate the checksum, but that is easy to do. The only issue is the lack of control of the barcode height. When using Windows I use Bullzip to print to PDF, or Windows 10 has a built-in print to PDF option. The only issue is using WMI to select the printer (and filename.) I guess in your case you would also have to specify the page size. Putting it all together to make a report - now that is where it gets... interesting. Good work in getting everything working.
-
I haven't had to deal with those too much. I've had to work with the Intermec label printers (with the label done in Crystal Reports), but it wasn't too bad.
When you're handling Crystal reports everything else is great.
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
-
That's why I use Avery label sheets and run 'em through my laser printer.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Well, for manual work that's better, but if you want to automate a bit it's not so fun any more.
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
-
As soon as someone mentions PDF I start to panic X| For a standard it's incredibly difficult and tooling is sparse or expensive. Recently went the wkhtmltopdf route too.
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript
-
Then add all the fun you can have with Zebra label printers. X|
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)
Everything presumably simple task I do seems to be that way.
-
Then add all the fun you can have with Zebra label printers. X|
Wrong is evil and must be defeated. - Jeff Ello Never stop dreaming - Freddie Kruger
Okay, so we printed labels to go on Damaged Vehicles being kept outside. They were rubberized and considered "weather-proof"... (Are you guessing how this ends?)... Turns out, I never bothered to check the operating temperature of the adhesive (okay, I did, but since it was 10 below Freezing, I thought we were fine). Windchill can get much colder. so, on a windy morning, we go outside to see about 1,000 Labels flying around, and bunching on the ground and the near the fence. Panic Sets in... At this point, the conversation the other day (When we put the label on, should we remove the GREASE PEN marker of the Lot #) came to mind, and one was GREATFUL that we decided to leave it on, just in case. At this point, we revert to PAPER labels with aggressive adhesive and a larger, more forgiving barcode font. Oh, don't make me think of labels...
-
The task I have is pretty basic: Generate a PDF label with some barcodes. To get there is a bit of a mission though, mostly due to the availability (or lack of) tools. I create an html template and have wkhtmltopdf convert it to pdf. Easy enough, but having precise layout and positioning in html isn't always that easy. Generating code39 and 128 barcodes is relatively easy with JsBarcode. Except when it doesn't want to display once converted to pdf. Then you find out you have to set both the script and html to utf-8 encoding and then it works. Generating a 2D pdf417 type barcode is relatively easy with a javascript library, except it fails to display once converted to pdf by wkhtmltopdf. So I find a .Net Core library that can generate the barcode as a png, convert the bytes to a base64 image and use that in the html by replacing placeholder text. Another hurdle was wkhtmltopdf suddenly becoming very slow after being pretty fast in the past. Finally tracked down the issue to spoolsvc and my default printer being a network printer that's not connected anymore. Once removed the conversion works at a decent speed again. In short, what should be an easy task had lots of complications and workarounds, some quite weird and difficult to track down, but in the end I learned some interesting things :)