Answer the question
In order to leave comments, you need to log in
How to get pdf file as string?
Tell me, is it possible to save a pdf file in a String? This string needs to be transferred and saved back to the pdf.
byte[] data = Files.readAllBytes(Paths.get(PDF));
String contentStream = new String(data);
PrintWriter writer = new PrintWriter(new File(PDF1), "UTF-8");
writer.write(contentStream);
writer.close();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question