Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

mCHSNUg5Pz8cPap
User
Posts: 133
Joined: Wed Aug 04, 2021 6:36 pm

Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by mCHSNUg5Pz8cPap »

The browser extension is great for opening PDF files on the Internet in the PDF-XChange desktop software. The PDF file opens in my browser, the PDF extension displays a button, I click the button, and the PDF opens in the PDF-XChange desktop software. This is great.

On the other hand, I almost never use the browser extension to convert webpages to PDF files. There are two reasons for this. The first, and most important, is that I need the PDF file to appear EXACTLY the same as the webpage appears in my browser. When PDF-XChange converts it to a PDF file, a lot of things change and/or get formatted oddly. The second reason is that the browser extension pushes me to a "save as" dialog to save the pdf file when what I really want is for it to immediately open in PDF-XChange (if I want to save it, I will do so from inside PDF-XChange).

Convert Screenshots to PDF
I propose solving the first problem by modify the extension to allow the option to create a pdf of a screenshot of the webpage instead of trying to distill the page through whatever means it currently uses. One way to do this is to modify the settings in the manner shown below:
Screenshot_markedup.png
.
The screenshot options can include: entire page, visible part of page, selected area, select and scroll (see Nimbus Capture extension for ideas about different screenshot options). If it's too complicated to support all of these different options, then just remove the drop down menu and set it to only capture the entire page.

Open PDF Directly in PDF App Instead of Forcing Use of "Save As" Dialog
I propose solving the second problem by modifying the extension to allow the option to either: (i) immediately open the created PDF in PDF-XChange or the default PDF app or (ii) save the pdf file, which would open the save as dialog.

Thanks.
You do not have the required permissions to view the files attached to this post.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6903
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by Paul - Tracker Supp »

Hi, mCHSNUg5Pz8cPap

this triggered quite the discussion here....

The long and short of things is that selecting part of a web page to convert is far from trivial, and to be honest we are not even sure yet if it can be done. It may be possible to convert only the "visible" part of the page such that if you zoom and pan in the browser to display only the region you want to convert, it may be possible to use that for the conversion. We will investigate further.

We cannot promise what the result will be, but we are going to seriously look into it. To that end I have raised a ticket for this, and while for internal use only, referring to is should mean support can get you a status report.
RT#6815: Feature Request :: Standard :: Convert only the visible section of a web page.

i hope this pans out, we will have to "hurry up and wait".

Kind regards,
Paul - Tracker Supp
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
mCHSNUg5Pz8cPap
User
Posts: 133
Joined: Wed Aug 04, 2021 6:36 pm

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by mCHSNUg5Pz8cPap »

I appreciate the team taking this seriously. I should note, however, that what I really want is not the capture and conversion of the visible part of the page, but the capture and conversion of the entire page as a screenshot including the part of the page that can only be reached by scrolling. It's much easier to remove a part of the page I don't want than it is to capture multiple screenshots of the visible part of a page and then combine them together.

For example, the way I envision it working is that the extension would first take a screenshot of the page like this:
NYT Screenshot.zip
.
The extension would then convert the screenshot to a pdf file that looks like this:
NYT PDF Screenshot.pdf
.
Granted it is a long single page PDF file, but it preserves the content of the original site exactly. In comparison, the current browser extension renders the same website as this:
NYT PDF - Current Extension.pdf
.
I need the PDF to show exactly what I see on the browser, which is why the screenshot version is better.

You might be able to draw inspiration for how to capture a screenshot of the entire page (including the part that is visible by scrolling down) from, for example, the screenshot feature built into MS Edge, Nimbus Capture extension, or other legitimate screenshot extensions. For example, a brief search for open source browser extension identified this extension, which has an MIT license: https://github.com/lxieyang/screenshot-extension. You might get some code/inspiration from it.
You do not have the required permissions to view the files attached to this post.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by TrackerSupp-Daniel »

Hello, mCHSNUg5Pz8cPap

I am not certain that capturing an image of the current display state is possible either, but will mention that in the ongoing discussion for you.

In the meantime, a quick way to accomplish something closer to this than the example you provided, is to increase the page height substantially (to reduce unnecessary "page breaks" in the formatting), and then increase the scale of the conversion a bit, as an example, here is what I get from this page when my settings are raised to 200 inches long (the maximum size supported by the specification) and 120% zoom:
https://www.nytimes.com/ca/
image.png
image(1).png
The New York Times Canada - Breaking News, US News, World News, Videos-120.pdf
After a conversion like this, you can simply use the Editors "rasterize page" function if you need it to be an image, but I think the layout was quite faithfully retained this way (and increasing the zoom level a bit more would likely make it near identical on my end).

Kind regards,
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
mCHSNUg5Pz8cPap
User
Posts: 133
Joined: Wed Aug 04, 2021 6:36 pm

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by mCHSNUg5Pz8cPap »

Is there an obvious process to arrive at the appropriate dimensions (200 in long with 120% zoom) to produce a good result? It seems like this would involve a lot of trial and error for each site (and many are formatted much worse than the NYT). Also, the extension should provide a solution that is better than my current workaround, which is to create a screenshot with the built-in screenshot tool in MS Edge and then manually import it into PDF-XChange for subsequent editing. It seems like fiddling with the dimensions for each webpage will take longer than my workaround.

BTW, regarding the 200 inches long limitation, the screenshot option I'm proposing will probably need to account for situations where the screenshot produces documents longer than 200 inches–e.g., automatically split the document into another page when it reaches 200 inches.

Ultimately, the problem to be solved is to make it fast and convenient for the extension to capture an entire webpage exactly the way it appears in my browser, convert it to pdf, and open it in PDF-XChange for subsequent editing.
Last edited by mCHSNUg5Pz8cPap on Thu Mar 07, 2024 4:13 pm, edited 1 time in total.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by TrackerSupp-Daniel »

Hello, mCHSNUg5Pz8cPap

The 200 inch limit is not something that we can budge on, longer pages will be split no matter the solution we offer. The PDF specification is firm on that and we need to adhere to it. While we have in recent times opened our Editor to view/edit already existing larger files, which other applications have created, we will not be creating any like this because it does explicitly go against the specification.

As for determining the appropriate size, yes that would be some trial and error, but in general, since webpage layout is relative to your browser window and system scaling, this should be a one off change, to determine based on your system, not something highly variable between websites. I chose 120 for my first test just on a gut feeling, and while it is not quite perfect (perhaps 125 would have been truer to the original) it turned out well enough for this example.

In any case, the Dev team is looking into this, and have confirmed that regardless of whether or not this specific Feature Request is able to be implemented in the future, the next build will contain some improvements aimed to help ensure that the conversion is notably better and closer to the original webpage, so my workaround may be obsolete very soon.

Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
mCHSNUg5Pz8cPap
User
Posts: 133
Joined: Wed Aug 04, 2021 6:36 pm

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by mCHSNUg5Pz8cPap »

I found an extension (Fireshot) that does what I want. Here is a video showing what I would like the PDF-XChange extension to do.
msedge_vBWPIZuWmg.gif
.
I wanted to upload a video of the output of the PDF-XChange extension for comparison, but it just shows a message saying "Webpage to PDF Converting" without ever completing the job.
You do not have the required permissions to view the files attached to this post.
Features I really want:
1. Fully customizable toolbars: https://forum.tracker-software.com/viewtopic.php?p=167585
2. Sanitize documents w/o being forced into save as dialog (Acrobat has this!): https://forum.tracker-software.com/viewtopic.php?p=156130
User avatar
TrackerSupp-Daniel
Site Admin
Posts: 8624
Joined: Wed Jan 03, 2018 6:52 pm

Re: Feature Request: Browser Extension Supports Converting Screenshots of Webpages to PDF

Post by TrackerSupp-Daniel »

Hello, mCHSNUg5Pz8cPap

Thank you for the plugin example, we will look into this and see what we can do to emulate it.

As for your latter comment about the "webpage to PDF converting" without completion, have you verified that a save as dialog is not opened in the background? If that is not the case, this can also sometimes occur with websites that are highly secured, or pages that do not have a web address, though in those cases, the adding will generally be "greyed out" and inaccessible, instead of attempting and failing to run, like so:
image.png
Kind regards,
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com