Barcode in PDF file

Hi Team,

I need to check whether a pfd file contain a barcode or not? There will be n number of pdf files. I just need to check there is a barcode or not?

Could you please help?

Regards.
Sreelakshmi

Read the directory path of the pdf files.
Take for each loop:
In that Use read pdf text to read pdf and store it in string variable.
Take if condition Check the pdf file contain a barcode or not

This wont work. Because its not reading the barcode.

It is scanned pdf or normal pdf…?
If it is scanned pdf use read pdf with ocr.

Hello @Sreelakshmi_Balachandran
To check whether a PDF file contains a barcode or not in UiPath, you can use the following approach:

  1. Install Dependencies:

    • Install the “UiPath.PDF.Activities” package from the Official UiPath Go! Marketplace. This package provides activities for working with PDF files.
  2. Load the PDF File:

    • Use the “Read PDF Text” activity to extract the text content from the PDF file.
  3. Barcode Detection:

Here’s an example workflow to demonstrate the overall process:

  1. Use the “Read PDF Text” activity to extract the text content from the PDF file.
  2. Install and configure a barcode detection library or service, such as ZXing or Dynamsoft Barcode Reader, in your workflow.
  3. Use the barcode detection library’s functions or methods to process the extracted text and check for the presence of a barcode.
  4. Based on the result of barcode detection, perform further actions such as logging, storing the information, or taking appropriate actions.

Please note that integrating third-party libraries or services may require additional configuration and licensing considerations. Make sure to review and comply with the terms and conditions of the specific library or service you choose to use.

Additionally, the effectiveness of barcode detection may vary based on the quality and complexity of the barcode images within the PDF files. It’s recommended to thoroughly test and evaluate the chosen barcode detection solution with your specific PDF files to ensure accurate results.