DinkToPdf
DinkToPdf copied to clipboard
Barcode Label generation using Custom page size
Hi,
I need to print barcode labels using this to generate multiple barcodes Label size 4mmX 2mm. this label contains an QR Code and the product details .
Can you share how we can implement custom page size.
Regards Harshit
Have you tried the custom paper size?
globalSettings = new GlobalSettings
{
ColorMode = ColorMode.Color,
Orientation = Orientation.Portrait,
PaperSize = new PechkinPaperSize("XXmm", "XXmm"),
Margins = new MarginSettings() { Top = MarginTop, Bottom = MarginBottom, Left = MarginLeft, Right = MarginRight },
DocumentTitle = "Tag",
};
var pdf = new HtmlToPdfDocument()
{
GlobalSettings = globalSettings,
Objects = { objectSettings }
};
file = await Task.Run(() => _pdfConverter.Convert(pdf));`
If you have already overcome this problem, what approach did you use?