ADOBE Parse PDF Tables

Hi there,

I’m running into an issue with the adobe_pdf_services_extract_text_and_tables".
I receive logs that state:
“No logging configuration. Using default config”
“2024-03-07T08:02:02.118:[INFO]: All validations successfully done. Beginning Extract Pdf operation execution”
“2024-03-07T08:02:19.527:[INFO]: Extract PDF Operation successfully completed”

But I get this error mesage with no results:
"
TypeError

Cannot read properties of undefined (reading ‘input’)
"

Hi @diaz,

It seems like the issue you’re encountering is related to accessing a property of an undefined object in your Pipedream workflow, specifically when trying to read 'input'. This error typically occurs when you try to access a property or method on an object that hasn’t been defined. Without seeing the specific code or configuration of your workflow, I can offer some general advice that might help you troubleshoot this issue.

First, ensure that the object you’re trying to access is properly defined and not undefined at the point where you’re trying to access its 'input' property. This can often happen if you’re trying to access data from a previous step in the workflow that didn’t execute as expected, or if there’s a typo in the step reference.

Here’s a simplified example to illustrate how you might safely access properties from a previous step:

export default defineComponent({
  async run({ steps, $ }) {
    // Example of safely accessing a property from a previous step
    if (steps.previousStepName && steps.previousStepName.result) {
      const input = steps.previousStepName.result.input;
      // Do something with the input
    } else {
      console.log('Previous step did not execute as expected or result is undefined');
    }
  },
});

In this example, previousStepName should be replaced with the actual name of the step you’re trying to access. This check ensures that you’re not trying to access a property of an undefined object, which would lead to the TypeError you’re experiencing.

If you’re still encountering issues, I recommend reviewing the specific step in your workflow where the error occurs to ensure that all objects and properties you’re trying to access are correctly defined and available at that point in the workflow. If you need further assistance, please don’t hesitate to reach out for more support at Support - Pipedream.

I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double-check my answers and code! Learn how to build your own.

this is my previous step code:

import tempfile
import os
import requests

def handler(pd: “pipedream”):

Fetch PDF from URL

url = pd.steps[“trigger”][“event”][“document”][“url”]
response = requests.get(url)
pdf_content = response.content

Write to a temporary file

with tempfile.NamedTemporaryFile(delete=False, suffix=‘.pdf’, mode=‘wb’) as tmp:
tmp.write(pdf_content)
temp_file_path = tmp.name

Pass the temp file path to the next step

return {“temp_file_path”: temp_file_path, “filename”:temp_file_path.split(“/”, 2)}

This works fine
its just the adobe pipedream step