# Parse pdf file in Workflowgen

**URL:** <https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850>\
**Category:** General WorkflowGen Discussion\
**Created:** [May 7, 2021, 9:40am UTC](https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850 "2021-05-07T09:40:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hajer](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@Hajer](https://discuss.workflowgen.com/u/Hajer)\
**Post date:** [May 7, 2021, 9:40am UTC](https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850/1 "2021-05-07T09:40:56Z")

</div>

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();
        }

    }

   

}

```

}

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [May 21, 2021, 3:35pm UTC](https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850/2 "2021-05-21T15:35:41Z")

</div>

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:

> **[Workflow Applications | WorkflowGen Documentation](https://docs.workflowgen.com/integration/workflow-applications)**

---

<div class="post-metadata">

**Author:** ![Hajer](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@Hajer](https://discuss.workflowgen.com/u/Hajer)\
**Post date:** [May 25, 2021, 7:47am UTC](https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850/3 "2021-05-25T07:47:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [May 25, 2021, 3:54pm UTC](https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850/4 "2021-05-25T15:54:00Z")

</div>

Hi @Hajer,

The link has been fixed

---

<div class="post-metadata">

**Author:** ![Hajer](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@Hajer](https://discuss.workflowgen.com/u/Hajer)\
**Post date:** [May 25, 2021, 4:09pm UTC](https://discuss.workflowgen.com/t/parse-pdf-file-in-workflowgen/1850/5 "2021-05-25T16:09:44Z")

</div>

HELLO @eddy.daouk !THANX
