Skip to content

Instantly share code, notes, and snippets.

@rafabn rafabn/url2pdf.js
Created Aug 18, 2009

Embed
What would you like to do?
CmdUtils.CreateCommand({
names: ["pdf", "url2pdf"],
icon: "http://www.adobe.com/lib/com.adobe/template/icon/pdf.gif",
description: "Print web page to pdf.",
help: "Select a url then print it to pdf.",
author: {name: "Rafael Bezerra", email: "rafabn+ubiquity@gmail.com"},
license: "GPL",
homepage: "http://labs.mozilla.com/",
arguments: [{role: 'object', nountype: noun_arb_text}],
preview: function preview(pblock, args) {
pblock.innerHTML = "Send to pdf this <b>" + args.object.html + "</b> web page.";
},
execute: function savePageToPDF(args) {
var pURL = "http://savepageaspdf.pdfonline.com/pdfonline/pdfonline.asp?cURL=" + args.object.text;
Utils.openUrlInBrowser(pURL);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.