Skip to content

Commit

Permalink
fix: string replace char
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarrettluo committed May 11, 2024
1 parent e38f014 commit 2d8c8ac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/jiaruiblog/util/PdfUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public static void readPdfText(InputStream file, String textPath) throws IOExcep
stripper.setStartPage(p);
stripper.setEndPage(p);
String text = stripper.getText(document);
text = text.replace("\n", "");
text = text.replaceAll(" ", ",");
text = text.replaceAll("\n", "");
text = text.replaceAll(" ", "");
fileWriter.write(text.trim());
}
} catch (Exception e) {
Expand Down

0 comments on commit 2d8c8ac

Please sign in to comment.