![]() Var myNewBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8) After creating a barcode, we may choose to resize and save which is easily done with: Var resultFromPdf = // From PDF use ReadPdf Var resultFromImage = BarcodeReader.Read(Image.FromFile("barcode.jpg")) // From an image Var resultFromBitMap = BarcodeReader.Read(new Bitmap("barcode.bmp")) // From a bitmap Reading a barcode is easy with IronBarcode: Image myBarcodeImage = myBarcode.Image // Can be used as Imageīitmap myBarcodeBitmap = myBarcode.ToBitmap() // Can be used as Bitmap Var myBarcode = BarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8) ![]() MyBarCode.StampToExistingPdfPages("ExistingPDF.pdf", 200, 50, new, "Password123") ' multiple pages of an encrypted PDF MyBarCode.StampToExistingPdfPage("ExistingPDF.pdf", 200, 50, 1) // position 200x50 on page 1 Save MyBarCode to a new PDF, or stamp it in any position on any page(s) of an existing Document String ImgTagForHTML = MyBarCode.ToHtmlTag() MyBarCode.SaveAsHtmlFile("MyBarCode.Html") Stream barcode image output also works for GIF,JPEG, PDF, PNG, BMP and TIFF Using (System.IO.Stream PdfStream = MyBarCode.ToPdfStream()) NET native objectsīitmap MyBarCodeBitmap = MyBarCode.ToBitmap() īyte PngBytes = MyBarCode.ToPngBinaryData() MyBarCode.SaveAsWindowsBitmap("MyBarCode.bmp") MyBarCode.SaveAsHtmlFile("MyBarCode.html") MyBarCode.ChangeBackgroundColor(Color.LightGoldenrodYellow) ![]() MyBarCode.ResizeTo(300, 150).SetMargins(20).AddAnnotationTextAboveBarcode("Example EAN8 Barcode").AddBarcodeValueTextBelowBarcode() Style the Barcode in a fluent LINQ style fashion GeneratedBarcode MyBarCode = BarcodeWriter.CreateBarcode("Any Number, String or Binary Value", BarcodeWriterEncoding.Code128) BarcodeWriter.CreateBarcode creates a GeneratedBarcode which can be styles and exported as an Image object or File ***** IN-DEPTH BARCODE CREATION OPTIONS *****/ ![]() Shorthand:: Create and save a barcode in a single line of codeīarcodeWriter.CreateBarcode("12345", BarcodeWriterEncoding.EAN8).ResizeTo(400, 100).SaveAsImage("EAN8.jpeg") Using System.Drawing // Include a reference to ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |