I wonder if it would be possible to use JavaScript to initiate Save As PDF from a button and automatically open the saved PDF actually saving is not important, just viewing it on a new tab is fine. Chrome-only solution is OK. Just like the desktop version of Chrome, you can now the Google Chrome browser on your iPad or iPhone to download web pages as PDF files without requiring a separate app. The menu options aren't very intuitive though so here's a quick walk-through.
From Google Chrome click on File Print. If you have another file manager app, you can use it instead. The easiest way to find your file is to open the Download folder. If you have more than one, tap the folder with the download icon on it. Your file should be the most recent on the list. Tap the file to open it using your app of choice. You may have multiple options available.
Use whichever one works best for you. In that case I use Amazon Kindle. If no options appear or you get an error, you may need to download a PDF reader first. Once installed, repeat the above process to open your PDF file. Chrome is not allowed to write to this folder. You can watch it try, and fail, by adding --enable-logging to your command. However, apparently part of the Chrome team is outright opposed to the mere existence of this command line option, and instead believe it would be better to force everyone using it to get a node.
Further, the above risk of Chrome one day getting rid of the command-line makes working even harder to get it working an iffy proposition. Behind the scenes Chrome simply uses wkhtmltopdf. I haven't tried it but it's likely this will get the job done. Open Print Preview if you're nervous. In wkhtmltopdf, it's actually a different build of Chromium, and that may produce rendering differences. Another alternative is to get ahead of the group looking to get rid of --print-to-pdf and use the browser dev API via Selenium as they prefer.
Ideally this would be async, since all the calls to Selenium are actually network commands, and writing that file could take a lot of Disk IO. The data returned from Chrome is actually a Stream as well. However Selenium's conventionally used library does not use async at all unfortunately, so it would take upgrading that library or identifying a solid async Selenium library for. Net to really do this right. That said it looks like those lobbying to wreck it gave up 2 years ago.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Press the "Alt" button to show the menu for Internet explorer. Then go to file and then click "Print". Step 2: Options will be displayed on the printing settings first select your printer.
Then select the name of the file that you are about to print, Select the destination of your file. Choose "Save as a PDF" file. One of the common problems experienced while printing to PDF from the above mentioned browsers is that the preview document may be blank or the printed file may be blank. In this case, you should make sure that your printers are operating properly. You can also solve the problem by resetting your browser settings.
The second problem is that the preview file may fail to open.
0コメント