0

I am working on ASP.NET MVC project. I am using c#. I am trying to use barcode in abcpdf version 8 but it doesn't seems to be working. I searched online but I didn't get much help anywhere. I am building string using stringbuilder and passing rawhtml using AddImageHtml like below :

int theID;
theID = theDoc.AddImageHtml(sb.ToString());

Here I am binding stylesheet in sb stringbuilder. I tried two things. One trying to reference font locally like :

link rel="stylesheet" type="text/css" href="~/Content/Code39Azalea/Code39Azalea.css">

This didn't work. After I tried to refer from server like this :

link rel="stylesheet" type="text/css" href="http://azalea.com/web-fonts/Code39Azalea.min.css">

which also not working.

When I searched online, I got some results which says @font-face can be used in abcpdf and some which says it doesn't support.

Can someone show me how I can use barcode in abcpdf.

dev
  • 1
  • 1
  • Why not build a handler that will build the bar code as an image, then include that image in an tag in your html? – Moose Sep 01 '15 at 02:59
  • @Moose do you mean I can use this one ? https://www.nuget.org/packages/Zen.Barcode.Rendering.Framework.Web/ . I am trying this but getting System.Web.Mvc.FileContentResult in place of barcode when i try to bind that to string. Can you suggest some link when I can get some help or show code template for this ? – dev Sep 01 '15 at 15:38
  • That nuget package should work just fine. I am not an MVC person so I can't help with the error you are getting. Break your issue in to pieces, get a url working that displays the barcode first, then get it to work in your pdf's html. – Moose Sep 01 '15 at 18:33

0 Answers0