Code39/Code93 do not render using Rotativa

2 posts, 0 answers
  1. John Thompson
    John Thompson avatar
    44 posts
    Member since:
    Dec 2009

    Posted 10 Jun 2014 Link to this post

    I am using the NuGet package Rotativa which in trun uses wkhtmltopdf.exe in a MVC 4 web application to generate PDF barcode documents from a standard MVC view.  While QRcode and Code128 barcodes work fine, Code39 and Code93 do not.  

    The code to invoke the view is:

    return (new Rotativa.ActionAsPdf("PrintTrailerPage", new { id = id, barcodeType = Request.Params["barcodeType"] ?? "qrcode" }) { FileName = String.Format("Trailer Page for {0}.pdf", model.DocumentName, model.BarcodeValue, model.ID), PageSize = Rotativa.Options.Size.Letter, PageOrientation = Rotativa.Options.Orientation.Portrait, PageMargins = { Left = 0, Right = 0, Top = 0, Bottom = 0 } });

    Curiously, PrintTrailerPage, which Rotativa invokes, always renders properly when displayed directly in the browser.  Do you have any ideas or insight that might help remedy this issue?
  2. T. Tsonev
    T. Tsonev avatar
    2830 posts

    Posted 12 Jun 2014 Link to this post


    I tried converting directly with wkhtmltopdf v. 0.12.1-rc3 and all barcodes are rendered without issue.
    Test page:
    Output: see attachment

    Rotative seems to be using quite an old version of wkhtmltopdf. Perhaps you can try to update it in place.

    I also recommend to switch to SVG rendering since you're outputting in a vector format:
    Test page:

    I hope this helps.

    T. Tsonev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top