I'm attempting to pass a large/long string, a PDF binary read from disk, into a Java app and so far am having very little success. The app works when I read the file in from a local disk, so I know the problem is related to how I'm importing the data. Roughly this is what I'm looking at:
I'm reading, manipulating the pdf in PHP and using exec(); to touch the Java app, this is where I'm at with the Java:
Works:
File input = new File("C:\\Users\\Jack\\Downloads\\col_terror.pdf");
document = PDDocument.load(input);
Does not work: PHP:
exec("/path/to/jar/java -jar JavaAppHere.jar $pdf_string",$ouput);
Java:
public static void main(String[] args) throws Exception {
...
document = PDDocument.load( args[0] );
...
}
I feel this is something quite simple I am not understanding about passing strings as args, though it has been a couple years since I've made a venture into the land of Java.