How to Read Barcode from PDFPrintBill_MOBD7BN6MWQR7CRP_1359903039.pdf (57.8 KB)
Only via custom activities. Please check this for QR CodeReader.
https://forum.uipath.com/t/how-to-read-qr-code-from-pdf-file/1401/2
Hi its working fine for QRCode but its not working for BARCODE??? help @badita
For Barcode you’ll need to create your own reader following that example.
for Barcode what code i write instead of this code @badita
QRCodeBitmapImage bitmapImage = new QRCodeBitmapImage((Bitmap)Image.FromFile(imagePath));
QRCodeDecoder decoder = new QRCodeDecoder();
var result = decoder.Decode(bitmapImage);
QRValue.Set(context, result);
You’ll need to create your own custom activities. Those works only for QRCode.
can you edit this code for barcode??? @badita
using System;
using System.Activities;
using System.ComponentModel;
using System.Drawing;
using MessagingToolkit.QRCode.Codec;
using MessagingToolkit.QRCode.Codec.Data;
using MessagingToolkit.Barcode;
namespace BARCodeReader.Activities
{
public class BARCodeReader : CodeActivity
{
[Category(“Input”)]
public InArgument ImagePath { get; set; }
[Category("Output")]
public OutArgument<string> QRValue { get; set; }
protected override void Execute(CodeActivityContext context)
{
var imagePath = ImagePath.Get(context);
QRCodeBitmapImage bitmapImage = new QRCodeBitmapImage((Bitmap)Image.FromFile(imagePath));
QRCodeDecoder decoder = new QRCodeDecoder();
var result = decoder.Decode(bitmapImage);
QRValue.Set(context, result);
}
}
}
Did you try this:
→ You should be having the MessagingToolKit.dll in C:\Windows\Microsoft.NET\Framework64\v4.0.30319
→ Try to import the Namespaces you need.
→ Add the Namespaces manually to your Xaml
ya i did this thing but i dont know what the exact code i write instead of this part of QRCode which work for BRCode
QRCodeBitmapImage bitmapImage = new QRCodeBitmapImage((Bitmap)Image.FromFile(imagePath));
QRCodeDecoder decoder = new QRCodeDecoder();
var result = decoder.Decode(bitmapImage);
QRValue.Set(context, result);
what i place instead of QRCodeDecoder decoder = new QRCodeDecoder() for BARCODE reader
Not sure if it works, but try decode options. If are not sure about batcode type, then just put them all.
can u give example for Making barcode from string
hi can u share the code for this qrcode custom activity?
Whether you have the code to read the barcode??? @opteamix_bot
There is a barcode project on Marketplace now: Barcode Activities - RPA Component | UiPath Marketplace