When using the printPdf() method to save a page as a pdf, an exception is thrown when the page title contains characters like: " : ", "<"
Steps to reproduce:
Open the https://botcity.dev page and use the printPdf() method. The following exception will be thrown indicating that there is an illegal character in the pdf file path:
java.nio.file.InvalidPathException: Illegal char <:> at index 67: C:\BotCity\workspace\Bots\Java-WebBot\bot-java-web-template\BotCity: Open Source RPA | All In One Automation Platform.pdf at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232) at java.base/java.nio.file.Path.of(Path.java:147) at java.base/java.nio.file.Paths.get(Paths.java:69) at dev.botcity.framework.bot.WebBot.printPdf(WebBot.java:857) at dev.botcity.framework.bot.WebBot.printPdf(WebBot.java:914) at dev.botcity.framework.bot.WebBot.printPdf(WebBot.java:924) at dev.botcity.main.FirstBotWeb.action(FirstBotWeb.java:33) at dev.botcity.maestro_sdk.BotExecutor.run(BotExecutor.java:28) at dev.botcity.main.FirstBotWeb.main(FirstBotWeb.java:48)
Description:
Steps to reproduce:
java.nio.file.InvalidPathException: Illegal char <:> at index 67: C:\BotCity\workspace\Bots\Java-WebBot\bot-java-web-template\BotCity: Open Source RPA | All In One Automation Platform.pdf at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232) at java.base/java.nio.file.Path.of(Path.java:147) at java.base/java.nio.file.Paths.get(Paths.java:69) at dev.botcity.framework.bot.WebBot.printPdf(WebBot.java:857) at dev.botcity.framework.bot.WebBot.printPdf(WebBot.java:914) at dev.botcity.framework.bot.WebBot.printPdf(WebBot.java:924) at dev.botcity.main.FirstBotWeb.action(FirstBotWeb.java:33) at dev.botcity.maestro_sdk.BotExecutor.run(BotExecutor.java:28) at dev.botcity.main.FirstBotWeb.main(FirstBotWeb.java:48)