Click here to Skip to main content
15,887,746 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Hey JSOP! Whoops I mean PIEBALDconsult! Sorry! Pin
honey the codewitch24-Dec-20 13:00
mvahoney the codewitch24-Dec-20 13:00 
GeneralRe: Hey JSOP! Whoops I mean PIEBALDconsult! Sorry! Pin
PIEBALDconsult24-Dec-20 13:34
mvePIEBALDconsult24-Dec-20 13:34 
GeneralRe: Hey JSOP! Whoops I mean PIEBALDconsult! Sorry! Pin
honey the codewitch24-Dec-20 15:48
mvahoney the codewitch24-Dec-20 15:48 
GeneralDilbert OTD: working from home problems Pin
OriginalGriff23-Dec-20 0:27
mveOriginalGriff23-Dec-20 0:27 
GeneralRe: Dilbert OTD: working from home problems Pin
rnbergren23-Dec-20 3:51
rnbergren23-Dec-20 3:51 
GeneralRe: Dilbert OTD: working from home problems Pin
Slow Eddie24-Dec-20 2:18
professionalSlow Eddie24-Dec-20 2:18 
GeneralRe: Dilbert OTD: working from home problems Pin
Kirk 1038982124-Dec-20 8:15
Kirk 1038982124-Dec-20 8:15 
GeneralThe weird issues and workarounds we sometimes have to deal with Pin
Jacquers22-Dec-20 21:37
Jacquers22-Dec-20 21:37 
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 Smile | :)


modified 23-Dec-20 7:29am.

GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jörgen Andersson23-Dec-20 0:45
professionalJörgen Andersson23-Dec-20 0:45 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
OriginalGriff23-Dec-20 0:47
mveOriginalGriff23-Dec-20 0:47 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jörgen Andersson23-Dec-20 2:55
professionalJörgen Andersson23-Dec-20 2:55 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jacquers23-Dec-20 0:53
Jacquers23-Dec-20 0:53 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jörgen Andersson23-Dec-20 2:52
professionalJörgen Andersson23-Dec-20 2:52 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Rob_P23-Dec-20 21:37
Rob_P23-Dec-20 21:37 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Kirk 1038982124-Dec-20 8:22
Kirk 1038982124-Dec-20 8:22 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Slacker00723-Dec-20 1:14
professionalSlacker00723-Dec-20 1:14 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jacquers23-Dec-20 1:30
Jacquers23-Dec-20 1:30 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Slacker00723-Dec-20 1:33
professionalSlacker00723-Dec-20 1:33 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jacquers23-Dec-20 1:36
Jacquers23-Dec-20 1:36 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Sander Rossel23-Dec-20 2:05
professionalSander Rossel23-Dec-20 2:05 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Jacquers23-Dec-20 3:12
Jacquers23-Dec-20 3:12 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Fueled By Decaff23-Dec-20 2:37
Fueled By Decaff23-Dec-20 2:37 
GeneralRe: The weird issues and workarounds we sometimes have to deal with Pin
Bob@work28-Dec-20 5:12
Bob@work28-Dec-20 5:12 
GeneralWSO CCC OTD 2020-12-23 Pin
yacCarsten22-Dec-20 21:27
yacCarsten22-Dec-20 21:27 
GeneralRe: WSO CCC OTD 2020-12-23 Pin
OriginalGriff22-Dec-20 21:42
mveOriginalGriff22-Dec-20 21:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.