Created
August 18, 2009 16:36
-
-
Save rafabn/169819 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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