have this Java code :
public class PdfByteReader {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
String filePath = args[0];
try {
String pdfContent = readPdfFileByteByByte(filePath);
System.out.println(pdfContent);
} catch (IOException e) {
System.err.println("ERROR" + e.getMessage());
}
}
public static String readPdfFileByteByByte(String filePath) throws IOException {
File pdfFile = new File(filePath);
StringBuilder content = new StringBuilder();
try (FileInputStream fis = new FileInputStream(pdfFile)) {
int byteRead;
while ((byteRead = fis.read()) != -1) {
content.append((char) byteRead);
}
}
return content.toString();
}
}
i can build a JAR file or create a Java Agent in a Lotus Notes app, but : how can i receive from lotus script the return value of this (string)?
i’m trying to parse a pdf file into string in order to upload to a API
New contributor
Lea Giardili is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.