You can identify the file in the post process using the command PREP_PROCESS_REPORTLIST. You might start with the below to identify the file:
:SET &HND# = PREP_PROCESS_REPORTLIST()
:PROCESS &HND#
: SET &RH_TYPE# = GET_PROCESS_LINE(&HND#, 1)
: SET &FILENAME# = GET_PROCESS_LINE(&HND#, 6)
: PRINT "&TH_TYPE# - &FILENAME#"
:ENDPROCESS
:CLOSE_PROCESS &HND#
To read the PDFs content I can recommend the "Convert-PDF" PowerShell module which is based on
itextsharp. You can install it using install-module or have a peek view here
https://www.powershellgallery.com/packages/ImportExcel/5.4.0It likely won't work with PowerShell Core so you must run it on a Windows machine. On Unix you might try to use the "strings" command which will try to extract any cleartext data from binary data. This might be enough for what you need.
Regards
Joel
------------------------------
Swisscom & WorkflowCommander
------------------------------
Original Message:
Sent: 10-08-2019 05:21 PM
From: Ken Yong
Subject: Read Oracle Finance PDF Output file
Thank you for your reply. Appreciate that! :)
------------------------------
Ken
TX, Houston
Original Message:
Sent: 10-08-2019 10:52 AM
From: Carsten Schmitz
Subject: Read Oracle Finance PDF Output file
Hi.
I'm not sure I fully understand the matter at hand. You can usually display the file directly from AWI using that download icon.
There is a path starting with /opt/app on your screenshot. You should also be able to locate it in that path and open it as a plain text file, using vi or notepad or any editor really. That file is probably a plain text file, so you can process that one, unlike a PDF, using Automic's script language (e.g. line by line with :PREP_PROCESS_FILE).
Hth,
Original Message:
Sent: 10-08-2019 10:02 AM
From: Ken Yong
Subject: Read Oracle Finance PDF Output file
Hi,
Thank you for your reply! Really appreciate that.
My another question is, when Oracle request completed, it will return the output file (.out) as per attached picture, are we able to get the file and read it? If yes, what would be the function?
Any help or reading guide is appreciated. Thank you! :)
------------------------------
Ken
TX, Houston
Original Message:
Sent: 10-08-2019 08:03 AM
From: Carsten Schmitz
Subject: Read Oracle Finance PDF Output file
Hi.
Automic does not include any native ability to parse (or search) PDF files, and you don't want to use any AutomicScript functions on binary files (such as PDF files), eventhough that might occasionally work it won't be reliable.
You'd need to use one of various tools that convert PDF to text. Do a Google search for, for example, "pdf command line", there are various free and non-free, open or closed source tools for various operating systems. You then call the external tool of your choice as part of your job plan, then you can analyze the resulting plain text in various ways (grep, AutomicScript etc.).
Hth,
Original Message:
Sent: 10-07-2019 06:27 PM
From: Ken Yong
Subject: Read Oracle Finance PDF Output file
Hi all, I have a job in Auomic which will be executing a request in OEBS (Oracle Finance) and once the request done, it will generate a PDF output file.
What I wanna do is: in the job's "Post Process", using the script to find a certain key work from the PDF output file. I know we can use "GET_PROCESS_LINE" function to read the text file, but how about reading the Output file in PDF and find for certain keywords?
Any help or reading guide is appreciated. Thank you! :)
------------------------------
Ken
TX, Houston
------------------------------