PK ƉKH:q0
0
build.xml
Removing overridden classes from librariesPK pFo build.sh#!/bin/bash
ORGANIZATION="play-pdf"
MODULE="pdf"
VERSION=`grep self conf/dependencies.yml | sed "s/.*$MODULE //"`
DESTINATION=/var/www/repo/$ORGANIZATION
TARGET=$DESTINATION/$MODULE-$VERSION.zip
rm -fr dist
play dependencies || exit $?
play build-module || exit $?
if [ -d $DESTINATION ]; then
if [ -e $TARGET ]; then
echo "Not publishing, $MODULE-$VERSION already exists"
else
cp dist/*.zip $TARGET
echo "Package is available at https://repo.codeborne.com/$ORGANIZATION/$MODULE-$VERSION.zip"
fi
fiPK ljKHx!( ( manifestversion=1.0
frameworkVersions=[1.2,1.4]
PK pF)zI READMEPDF module for the Play! framework. This module allows you to easily create PDF documents.
Copyright 2010
Nicolas Leroux - nicolas@lunatech.com www.lunatech-research.com/users/nicolas-leroux
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
PK pF debian/rules#!/usr/bin/make -f
#-*- makefile -*-
# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Christoph Lameter.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
#export DH_COMPAT=3
VERSION=0.9
MODULE_NAME=pdf
PLAY_VERSION=1.2
APP=play-1.2-$(MODULE_NAME)-module-$(VERSION)
MODULE=$(MODULE_NAME)-$(VERSION)
DEB_PATH=debian/$(APP)
INSTALL_PATH=/usr/share/play-modules/$(PLAY_VERSION)/$(MODULE)
DOC_INSTALL_PATH=/usr/share/doc/$(APP)
%:
dh $@
override_dh_auto_build:
/bin/echo -e '\n\n' | play-$(PLAY_VERSION) build-module
override_dh_auto_install:
install -d $(DEB_PATH)$(INSTALL_PATH)
rsync -r --exclude .svn --exclude .CVS app lib src public $(DEB_PATH)$(INSTALL_PATH)
install -d $(DEB_PATH)$(DOC_INSTALL_PATH)
rsync -r --exclude .svn --exclude .CVS README $(DEB_PATH)$(DOC_INSTALL_PATH)
PK pF[1
debian/compat7
PK pF}/l l debian/controlSource: play-1.2-pdf-module-0.9
Section: unknown
Priority: extra
Maintainer: Stephane Epardaud
Build-Depends: debhelper (>= 7), play-1.2
Standards-Version: 3.8.3
Package: play-1.2-pdf-module-0.9
Architecture: all
Depends: ${misc:Depends}
Conflicts: play-1.1-unstable-r1003 (<< 1.1-unstable-r1003-1ubuntu4)
Description: The Play! PDF module
PK pFo3 debian/changelogplay-1.2-pdf-module-0.9 (0.9.0) oneiric; urgency=low
* Removed module application and public directories since they are just duplicates of the sample application
* Refactored the sample application and added some tests
* Added dependency configuration
-- Stephane Thomas Mon, 19 Dec 2011 14:53:00 +0100
play-1.2-pdf-module-0.8 (0.8.0) oneiric; urgency=low
* Updated YaHP from 1.2.20c to 1.3, as well as third party libraries
-- Erik Bakker Fri, 02 Dec 2011 15:14:13 +0100
play-1.1-pdf-module-0.6 (0.6.3) maverick; urgency=low
* Made the code in charge of detecting data uri images more robust.
-- Stephane Thomas Thu, 28 Jul 2011 15:02:00 +0200
play-1.1-pdf-module-0.6 (0.6.2) maverick; urgency=low
* Added an additional check to be able to handle tags without any 'src' attribute.
* Refined logging and updated formatting.
-- Stephane Thomas Thu, 28 Jul 2011 11:09:00 +0200
play-1.1-pdf-module-0.6 (0.6.1) maverick; urgency=low
* Added support for data uri images.
-- Stephane Thomas Tue, 26 Jul 2011 14:16:00 +0200
play-1.1-pdf-module-0.6 (0.6) maverick; urgency=low
* Fixed build compiler path (#13)
* Added per-document remplate parameters (#16)
* Pass parameters to writePDF (#15)
* Drop xmlapi jar (#8)
-- Stephane Epardaud Fri, 20 May 2011 14:35:54 +0200
play-1.1-pdf-module-0.5 (0.5) maverick; urgency=low
* Upgraded to YaHP v1.2.20b 17/01/2011
-- Stephane Epardaud Wed, 23 Mar 2011 17:44:46 +0100
play-1.1-pdf-module-0.4 (0.4) maverick; urgency=low
* Add support for multiple PDF documents at a time
-- Stephane Epardaud Mon, 07 Feb 2011 16:23:14 +0100
play-1.1-pdf-module-0.3 (0.3) maverick; urgency=low
* Fixed validation that hung when the xml parser tried to get a DTD from the W3C site
* Fixed https URLs (should be looked up by Play!)
* Fixed IE bug when using https, content-disposition and cache headers
-- Stephane Epardaud Wed, 10 Nov 2010 11:02:26 +0100
play-1.1-pdf-module-0.2 (0.2) maverick; urgency=low
* Fixed links, image references and encoding of html entities.
-- Stephane Epardaud Fri, 08 Oct 2010 09:34:02 +0200
play-1.1-pdf-module-0.1 (0.1) UNRELEASED; urgency=low
* Initial release
-- Stephane Epardaud Wed, 06 Oct 2010 15:37:22 +0200
PK pFl2 2 ! documentation/manual/home.textileh1. PDF module
The PDF module allows you to render PDF document. It is rather simple to use as it only requires to import a static file.
h2. Enable the PDF module for the application
In the **/conf/application.conf** file, enable the PDF module by adding this line:
bc. # The PDF module
module.pdf=${play.path}/modules/pdf
h2. Using the PDF module
h3. The renderPDF() method:
bc. import static play.modules.pdf.PDF.*;
And then use the renderPDF() method as you would use the render() method.
The renderPDF will first look for a .pdf template. If there are none, it will fall back to the .html template. You can use a media="print" css to customize the PDF to render. The result is a PDF file. The render method uses the same template as for rendering HTML.
Please refer to the samples-and-test for an example.
h3. Rendering multiple documents
You can render multiple documents which will be concatenated for you. For this you must pass an instance
of @MultiPDFDocuments@ as first argument, which contains a file name and a list of @PDFDocument@
which each contain a template path and @Options@.
Each @PDFDocument@ can have its extra set of rendered parameters, in addition to those provided by the
@renderPDF()@ call.
h3. Passing options
If one of your parameters to renderPDF() is an instance of PDF.Options you can specify the following options:
|Option|Type|Description|Default|
|FOOTER|String|Footer content|None|
|FOOTER_TEMPLATE|String|Path to a template used to produce the footer content|None|
|HEADER|String|Header content|None|
|HEADER_TEMPLATE|String|Path to a template used to produce the header content|None|
|filename|String|The name of the PDF file to produce|templateName + ".pdf"|
|pageSize|IHtmlToPdfTransformer.PageSize|The page size and margins|IHtmlToPdfTransformer.A4P|
If one of your parameters to renderPDF() is a constant String (not passed by a local variable) that represents
the path to the template to render instead of one deduced from the current action name.
Note that the IHtmlToPdfTransformer.A4 sizes are wrong, so you should probably make your own sizes to correct them.
Note that if you use templates for headers and footers you have to include the CSS inline rules in the templates, since
the ones from the main document template will not be applied.
h3. About CSS
You can define CSS in your pages as follows:
Import:
bc.
Or inline:
bc.
See the "CSS specs":http://www.w3.org/TR/CSS2/page.html for options relative to page sizes, margins and breaks.
Note that there's a special rule inserted by the PDF renderer that sets the page margins to those specified in the page size
option. If you wish to override it you can use the !important flag on every CSS margin or padding value.
h4. Paging tables
If you want your table headers to follow on page breaks, use the thead element for your header rows and the following
special CSS attribute on your table:
bc. -fs-table-paginate: paginate;
PK ljKHG?r~ ~ lib/play-pdf.jarPK
ȉKH META-INF/ PK
ljKHz* META-INF/MANIFEST.MFM @w:@ZQ6|$Ws) BqNqFxRଶFĒ<-gM ԋӒ,^x;X]*Cи]5g]p
nYdv0c(_PK
ȉKH org/PK
ȉKH
org/allcolor/PK
ȉKH org/allcolor/yahp/PK
ȉKH org/allcolor/yahp/cl/PK
ȉKH org/allcolor/yahp/cl/converter/PK
ȉKH org/xhtmlrenderer/PK
ȉKH org/xhtmlrenderer/pdf/PK
ȉKH org/xhtmlrenderer/swing/PK
ȉKH play/PK
ȉKH
play/modules/PK
ȉKH play/modules/pdf/PK
ȉKH< H org/allcolor/yahp/cl/converter/CHtmlToPdfFlyingSaucerTransformer$1.classR]kA=mZo[m,i
J
Ol22)-G" xgB°;{f_ ãETq6=;0B=z2oɀ"@gcN.5+TP,dSVΨHc'ƴ_뜆QZEP9
)V'YDHy#iݾ֦"롇>QGÇ=l@eJ3y_k{q'}lLh