Last activity: 3 Aug 2017 15:49 EDT
PDF Parsing to Clipboard
Once I have attached a pdf document manually into an work object, that pdf infomation has to be parsed into the clipboard automatically.
For example, If that pdf contains the information like name, age, mobile it has to be parsed to the property which is available in the case as same.
I have attached a sample pdf of it
can anyone please help me in this...
Go for eform. Its easy to parse as the format is well defined.
Thanks for the reply Saikatc8
Is there a way to convert or push the attachment which is uploaded from the email to the work object into an eform
what i done is like uploaded an pdf template in the eform n mapping it to the clipboard
yeah its working good
but how to convert a uploaded pdf document into eform
Agree with Saikatc8 above - design a suitable 'eFrom' if possible - this will be easier to map in the long run.
if you have no control over the PDFs though (say you are processing existing PDFs which are not eForms): you can use 'pdfBox' (which ships with PRPC) to extract the text - you'll still need to do some additional work (regex ?) to extract out the specific bits of text you need to map to properties.
There is some example code on this post that illustrates how to strip text from a PDF using PDFBox:
Looking at the file you provided 'Sample PDF.pdf' - this already appears to be an 'eform' (at least when I open it up in 'Foxit' reader - its informs me that there are 'interactive fields' present').
So you can fairly easily map eforms to PRPC properties using built-in rules: start here : https://community.pega.com/sites/default/files/help_v722/procomhelpmain.htm
thanks for you reply PRITJ
as you said, with this pdf template i have done an POC to parse the info to the clipboard
its working well
but my requirement is like i will be getting the pdf document from email
so using email listener i will attach it to the work object
i need to parse the infomation to the clipboard
for example in the pdf it has the info like debit amount, account number, account name.
i will have the same field name which available in the pdf as a property for the case
it has to parse the info to the case and need to process further.
Check CreateWorkFromMail sample activity, it does almost same thing. Get email, create work object and then attach it to the work object.
yep i have already checked with that activity, it getting the document from mail and attaching it to the work object
but after attached to the work object, i need to parse its info to the clipboard.
is there any way for that ...
Did you try using ExtractDataFromEForm activity?
You can define the Rule-Map-eForm at your Work class, load the PDF content to a Code-Pega-eForm page in clipboard and pass these two as parameters to this activity.
With regard to:
i need to parse its info to the clipboard.
is there any way for that ...
The previously posted link:
Shows a way to extract the (raw text) from a PDF (and maps it to a single Clipboard Property).
In my understanding: there is no easy way of creating a mapping here - because a PDF document (non eform type at least) isn't structured in 'fields' that can be mapped in a generic way; you are basically working with blocks of text (and other entities like images) when you look at a PDF.
PDF EForm Help
I am using my self-study VM as a lab to prototype POC for merging/concatenating PDFs.
With such I am attempting to upload PDF with the EForm Accelerator and then Map the Pdf fields to properties on the clipboard.
I can create both rules for PDF which include Rule-File-eForm and Rule-Map-eForm rule.
I then create an activity to call the ‘GenerateEForm’ activity.
For the parameters, I have entered the MapPurpose and TargetEFormPage.
I run the activity from the ‘Actions’ menu on my calling activity.
I get the error Unable to find the specified Rule-Map-eForm rule ‘Code-Pega-eForm.ManualTest’
I have tried this many ways for a few days now.
No matter what I do I get the same error.
I moved your comment that was on a different thread that matched this one exactly to a new thread of its own. Please continue the discussion there.