Printable web pages on the fly ! |
|
|
|
|
Web2Printer is the first and most powerful printer-friendly Open Source Software Open today. Based on the Jave 5 EE Platform it is easy to install, simple to manage, and reliable. Prerequisites
Web2printer based on the Java 5 EE Platform:
Getting Web2PrinterWeb2Printer is distributed under the BSD License with sourcecode includes. Download from here FunctionsWeb2Printer works online, real-time. There is no need to define a second, "hidden" page. Just put a appropriate hyperlink in your document. Web2Printer generates a meaningful page footer, to preserves the origin and navigation information. The footer contains:
With web2printer you can easily clip the web page content to the print relevant part i.e cut of menus and ads. This embed the relevant part into two html comments: The html comment text can be configured! Web2Printer comes in two editions:
UsageServletTo use the web2printer servlet just insert a hyperlink to the web2printer servlet on your printable web page. Example 1: http://www.printer-friendly.com/web2printer/print?page=/2008011945/java/web2printer.html&lnk=1&img=3 Servlet FilterFor the web2printer servlet filter just append "web2printer" to your get or post parameters. ParametersWeb2printer accepts get and post parameters. The parameters validated before they are processed.
BuildWeb2printer is built using the Maven software project management tool. Follow these instructions to build web2printer from source on your machine. PrerequisitesTo build web2printer, you'll need the software listed below installed on your machine.
Running a web2printer buildmvn package
The output will be put in the "target" folder of every subproject. Building the documentationTo build the documentation site, execute: mvn site The documentation will be put in the target/site folder.
ConfigurationThe web2printer configuration will be done via the init-parameters inside the web.xml file. <!-- web2printer default language --><init-param> <param-name>defaultLocale</param-name> <param-value>en_US</param-value> </init-param> <!-- resolve user locale on every request --> <init-param> <param-name>localePerRequest</param-name> <param-value>true</param-value> </init-param> <!-- definition of clipping area --> <init-param> <param-name>startToken</param-name> <param-value><![CDATA[<!-- start main content -->]]></param-value> </init-param> <init-param> <param-name>endToken</param-name> <param-value><![CDATA[<!-- end main content -->]]></param-value> </init-param> <!-- The following parameters on relevant for web2printer servlet --> <!-- site url, other hostnames not accepted --> <init-param> <param-name>site-url</param-name> <param-value>http://localhost:8080/web2printer</param-value> </init-param> <!-- timeout in milliseconds for retieve content --> <init-param> <param-name>timeout</param-name> <param-value>3000</param-value> </init-param> LocalisationTo localise web2printer, just create a messages.properties for your language an locale. Your translations are welcome. |
|||||||||||||||||||||||||||||||||||||||||||||
| Next > |
|---|