public byte[] GetPDFWithBarcodeAndAddress(int barcodePositionTop, int barcodePositionLeft, string[] addressLines) { PDFGenerator pdfGenerator = new PDFGenerator(PDFDocumentWidth, PDFDocumentHeight); pdfGenerator.InsertCode(GetBarcode(ImageFormat.Png), barcodePositionTop, barcodePositionLeft, addressLines); return(pdfGenerator.GetPDFFile()); }
/// <summary> /// Gets content of PDF file with barcode in specified position. /// </summary> /// <param name="barcodePositionTop">Distance from top in mm.</param> /// <param name="barcodePositionLeft">Distance from left in mm.</param> /// <param name="sizeFactor"> Pixel square side (1 pixel = sizeFactor x sizeFactor) </param> /// <returns></returns> public byte[] GetPDFWithBarcode(int barcodePositionTop, int barcodePositionLeft, int sizeFactor) { PDFGenerator pdfGenerator = new PDFGenerator(PDFDocumentWidth, PDFDocumentHeight); pdfGenerator.InsertCode(GetBarcode(ImageFormat.Png, sizeFactor), barcodePositionTop, barcodePositionLeft); return(pdfGenerator.GetPDFFile()); }