Parse pdf file in Workflowgen

Hello ,
I need to develop a script .net that can parse a pdf attachement on WorkflowGen.
Any helps please ?
I decelopped this code but i use external librairy so i’m not sure that is will work on My WorkflowGen
Thanx

using iTextSharp.text.pdf;
using iTextSharp.text.pdf.parser;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PDFPARSER
{
class Program
{
static void Main(string[] args)
{
String path = @“C:\Users\hazouzi\Desktop\docs rh\WELCOME BOOK_stagiaire.pdf”;
var a = ExtractTextFromPdf(path);
var b = a.ToString().Contains(“Refraining from cluttering the work”);
if (b == true)
{
var c = a.IndexOf(“Refraining from cluttering the work”);

        }

    }
    public static string ExtractTextFromPdf(string path)
    {
        using (PdfReader reader = new PdfReader(path))
        {
            StringBuilder text = new StringBuilder();

            for (int i = 1; i <= reader.NumberOfPages; i++)
            {
                text.Append(PdfTextExtractor.GetTextFromPage(reader, i));
            }

            return text.ToString();
        }

    }


   

}

}

Hi @Hajer,

You’ll need to create a custom application for this to work.

I recommend reading this documentation on how to implement a custom application in WorkflowGen:

1 Like

Hi @eddy.daouk
thanks for your help but when i try to use this link i get not found .

Hi @Hajer,

The link has been fixed

HELLO @eddy.daouk !THANX