How to save a webpage as a PDF or image

Source: Internet
Author: User

For some webpages, I want to save them completely, but save them as HTML, and then download CSS, JS, and image files. If they are saved as MHT, it cannot be enabled on any computer, and encoding problems are involved.

So I want to save it as an image or PDF document. Both methods are designed for websites with special characteristics. Currently, we have tried two methods:

Method 1: Use the plug-in program-PDF download

For general web pages can be competent, for Firefox and Internet Explorer 7 or above programs can be downloaded on the site: http://www.pdfdownload.org.

However, there are two common problems:

(1) If there is a lot of webpage content or the network speed is not fast, wait for a while.

(2) The most common problem is that webpage storage is abnormal, such as font display problems.

(3) If the webpage contains video or audio content, it is more likely to cause problems.

Of course, it may also be my use problem. In fact, no one can say that they are completely proficient in the use of browsers?


Method 2: Use a virtual print program, such as dopdf or fineprint.


In this method, you can save the webpage as an image directly, but note the following:

Due to the diversity of web design technologies, if there are many elements on the web page, it is easy to encounter a problem when using these programs to save, that is, the web page structure is prone to deformation.

Another problem that I often encounter is that the saved articles have two lines of characters at the top of the document, with the title and website address displayed at the top of the document, the original web site is displayed at the bottom of the document.

Of course, we can remove this from other PDF documents or images, but this undoubtedly adds another process. Here, we just need to take one more step while saving the data so that we can remove these items.

First, this method is effective for Firefox and has not been tested for IE.

Select print preview, select -- blank -- in "Page setup", and set the margins of the current page, such as top, bottom, left, right, etc.

After the settings are complete, you can remove the upper and lower lines of text on the webpage.

Next, we need to configure webpage deformation and file loss.

I found only one way to solve the problem of webpage deformation and file loss, that is, to adjust the size of the virtual printed document and increase the pre-configured A4 to A3 and A2 in the virtual printer, or custom. The general principle is to adjust "paper size" to a larger direction. As long as the webpage can be completely put down or larger, the problem of deformation or loss of webpage elements will be solved.

The problem is that the size of the saved document is larger than the size of A4.

Note: The paper size must be adjusted in dopdf or fineprint.



 

After use, the two methods have their own advantages. Therefore, they can be used according to the actual situation, and some other places can be set by themselves, such as saving the image quality and scaling ratio, can continue to set to meet the needs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.