This is a migrated thread and some comments may be shown as answers.

Code39/Code93 do not render using Rotativa

1 Answer 338 Views
Barcode
This is a migrated thread and some comments may be shown as answers.
John Thompson
Top achievements
Rank 2
John Thompson asked on 10 Jun 2014, 03:59 PM
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?

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 12 Jun 2014, 09:10 AM
Hi,

I tried converting directly with wkhtmltopdf v. 0.12.1-rc3 and all barcodes are rendered without issue.
Test page: http://trykendoui.telerik.com/EJOT
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: http://trykendoui.telerik.com/EJOT/2

I hope this helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Barcode
Asked by
John Thompson
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Share this question
or