0

We have an online transport application which prints tickets in PDF format which includes barcode for scanning while travelling.Currently we have to change printing format from PDF to HTML.While doing that Barcode is not getting printed.So,is it possible to have Barcode printed in HTML format?More Info related to this would be grateful...

3
  • a list with all items float:left and with a specific witdh and use the background color to make it a barcode :) Commented Aug 28, 2012 at 9:19
  • 1
    I think you'd struggle to get this spot on using css. Different browsers and resolutions will play a nightmare with your spacing. Commented Aug 28, 2012 at 9:23
  • ok,i would check that..changing css.. Commented Aug 28, 2012 at 9:25

2 Answers 2

1

Why don't you pregenerate the barcode as an image and get it to the page? Here is a simple opensource library that could do just that. Example is included.

Sign up to request clarification or add additional context in comments.

Comments

1

You can create an HTML representation of your barcode, just remember: The way a page is showed depends on the styles you apply to it, and the way the client interprets it (That's wy I.E. is a pain in the...).

A barcode has dimension restrictions to be interpreted. That would make your styling a mess.

Besides, when printing a webpage, the client (Internet Explorer, Mozilla, Chrome, Safari etc.) could have been configured by the user to save ink or improve legibility, so the barcode might not get printed the best.

I'm with t3hn00b. The easiest would be to generate the barcode in server as a jpg or png that is inserted in your html. That way you keep the dimensions and your barcode is less prone to errors when printing.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.