在ios设备中将网页转换为PDF

Save Webpages as PDF in Safari on iPad without Third-Party Apps

Mariam Yusuf 

Apple’s App Store contains quite a significant number of quality iPad apps for PDF viewing, editing, annotation and organization.  Hence, it is logical to save webpages as PDF for reference purposes.  Without using any third-party app, webpages can be easily and quickly saved as PDF from within Safari.

Follow the steps below to create a bookmarklet (a bookmark having Javascript code) that can then be used to save any webpage as PDF.

1.  Bookmark the current page (or, in fact, any other page; it doesn’t matter as the bookmarked address will be edited later in step 4).  Simply tap the toolbar button shown in the image below and then select Bookmark.

bookmark safari ipad

 

2.  In the title field, change the title to  Convert to PDF (or Save as PDF etc.).  Make sure that the bookmark is being saved to Bookmarks Bar as shown in the image below.

convert to pdf

3.  Press Save

4.  Next edit this saved bookmark.  Tap the bookmarks button and then Select Bookmarks Bar. Tap the Edit button and select Convert to PDF bookmark. 

3. edit bookmarkbar 

5.  In the address field of the bookmark, copy and paste the following code:

javascript:pdf_url=location.href;location.href='http://pdfmyurl.com?url='+escape(pdf_url)

Done and ready to use!

To save a webpage as pdf, simply tap Convert to PDF from Safari toobar.  The webpage will be converted to PDF and Safari will then display the rendered PDF.  To save the PDF, simply tap the opened PDF document once for the regular Open In menu to appear.  The PDF document can now be opened/saved in your favourite PDF app.

This bookmarklet utilizes the online pdf conversion service from pdfmyurl.com.  If you would like to make use of any other online services for pdf conversion, just change the javascript code in step 5.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值