Greetings,
There is no package ready to extract PDF information into a file, sadly.
But, you could obtain the contents of a PDF file (or any attachment, really) using the REST API Functionality:
https://exchange.xforce.ibmcloud.com/hub/extension/b1e4814282b33a826f36c72cf1bc4751
First, query to get all Incident Attachments using:
/orgs/{org_id}/incidents/{inc_id}/attachments
Obtain the ID of the desired attachment, and then get the content using:
/orgs/{org_id}/incidents/{inc_id}/attachments/{attach_id}/contents
Anyways you should be careful with this approach. Malicious code can be injected into PDF files and then executed upon reading it's contents. I'm not entirely sure if this can be triggered with GET actions specifically for PDS, but nonetheless you should still be cautious if you are going to read external /unsecure files.
Cheers!
------------------------------
Pol Estecha Hernández
------------------------------
Original Message:
Sent: Wed September 20, 2023 10:10 AM
From: Federico Camelino
Subject: Get PDF attachment content
Hi,
I need to get the content of a pdf file in string format. I didn't find an application or Python code that helped me with this case. Can they help me?
Thanks, regards!
------------------------------
Federico Camelino
------------------------------