Data from PDF Extension Library
The Data from PDF Extension Library adds the Data from PDF custom activity. It reads an inbound binary PDF message, pulls useful PDF content into JSON, identifies simple Label: value fields where possible, and returns the JSON response to the workflow.
This is a generic PDF-to-JSON activity. It is not tied to a specific PDF form or vendor layout. For scanned image-only PDFs, use OCR before this activity.
Download IntegrationSoup.DataFromPdfActivities.msi
Using It In A Workflow
1. Run the MSI on the Integration Soup server.
2. Restart the Integration Soup Host Service so the server loads the new activity.
3. Add Data from PDF after the step that supplies the PDF.
4. Pass the PDF as the activity message using a binary message. Binary PDF content is normally represented as base64 text inside Integration Soup.
5. Run the workflow once with a representative PDF.
6. Open the workflow logs and copy the activity response JSON.
7. Use the response JSON in following transformers. You can create mappings from the Data from PDF response, or type JSON paths manually.
8. For a full binding tree, add the Run Code workaround below after the Data from PDF activity.
Why The First Run Matters
The activity declares its response as user-defined with JSON as the default message type. The starter sample is {}, so the designer knows the response should be treated as JSON but does not yet know your PDF's exact field structure.
The JSON from the first run shows the actual structure produced by your PDF. Use a representative PDF that contains all fields you expect to bind. If different PDF layouts produce different fields, use a sample that contains the widest useful structure.
Getting A Binding Tree
If the custom activity editor does not show a response sample textbox, transformer mappings can be created by typing the JSON paths manually. A simple workaround is to add a Run Code activity immediately after Data from PDF and use it as a JSON pass-through sample step.
1. Add a Run Code activity after Data from PDF.
2. Replace the default C# code with this pass-through line:
CurrentActivity.ResponseMessage.SetText(CurrentActivity.Message.Text);
3. Change the Run Code message type to JSON.
4. In the Message Template, delete the default content.
5. Right-click inside the Message Template textbox, choose Insert Activity Message, then select the Data from PDF Response message.
6. Click the Response Message textbox so the editor opens, then paste the JSON copied from the workflow logs.
7. Save the Run Code activity.
8. In later activities, bind from the Run Code response message to get the full JSON binding tree.
What The Activity Returns
The JSON response includes document details, detected label-value fields, full text, per-page text, and line information that can help when checking the result. The detected fields are best-effort and come from visible text patterns such as Invoice Number: 12345.
If text appears after a blank label but does not have its own label, the activity keeps it under generic names such as unlabeledAfterAcc, unlabeledAfterAccLine1, and unlabeledBlock1Line1. The same pattern is used for other labels. These names describe where the text was found, not what the text means.
Requirements And Notes
- The activity expects a PDF in the inbound binary message.
- The PDF must contain selectable text. Scanned PDFs need OCR first.
- If a PDF has unusual layout, inspect the
textandpagessections in the response JSON.
- Extension Library Directory
- HTML to PDF
- RTF to PDF
- Azure Activities
- AWS Activities
- Encryption Activities
- SFTP Activities
- Validate HL7 Transformer
- HL7 Value Transformers
- Data from PDF