Hello,

I have been a Geoserver user for a couple of years (2.0.2 and now 2.2.5)
and have recently installed the Print Module
(Geoserver-2-2-SNAPSHOT-printing-plugin.zip) from the
geoserver/2.2x/community-2013-08-19 folder on the build server.  I have
installed this, can run the demo page and print a pdf from it without any
problem.

As part of my current project's requirements I need to be able to print
GIFs as well as PDFs and from doing a bit of research came to the
conclusion that I needed to add a list of formats to my config.yaml file in
the Data_dir/printing folder, added as:
formats: ['pdf','png','gif'].

This I did but at no point does a list of outputFormats get returned in the
json output from server/geoserver/pdf/info.json (below).  I have made no
other modifications to the config.yaml although I did experiment with
adding extra scales/dpis which were returned successfully.

{"scales":[{"name":"1:25,000","value":"25000"},{"name":"1:50,000","value":"50000"},{"name":"1:100,000","value":"100000"},{"name":"1:200,000","value":"200000"},{"name":"1:500,000","value":"500000"},{"name":"1:1,000,000","value":"1000000"},{"name":"1:2,000,000","value":"2000000"},{"name":"1:4,000,000","value":"4000000"}],"dpis":[{"name":"75","value":"75"},{"name":"150","value":"150"},{"name":"300","value":"300"},{"name":"600","value":"600"}],"layouts":[{"name":"A4
portrait","map":{"width":440,"height":483},"rotation":true},{"name":"Legal","map":{"width":440,"height":483},"rotation":false}],"printURL":"server/geoserver/pdf/print.pdf","createURL":"server/geoserver/pdf/create.json"}

After further investigation I came across a similar problem GEOS-5095 (
https://jira.codehaus.org/browse/GEOS-5095) and a patch, which I believe I
have successfully implemented into the printing module in the
community/printing folder in the Git 2.2.x branch.  After rebuilding this
using mavern (3.0.03 on Mac OS X, unit tests were skipped during the build
as these were failing thus I could not produce a jar file) I copied the
output printing-2.2-SNAPSHOT.jar to my WEB-INF/lib directory but this
generates a runtime error in OpenLayers.js (IndexSizeError: Index or size
is negative or greater than the allowed amount, line 225) when I go to the
Printing demo page
server/geoserver/web/?wicket:bookmarkablePage=:org.geoserver.printing.PrintDemoPage.

Running the server/geoserver/pdf/info.json still does not provide any
outputFormats either which I guess is the problem with OpenLayers because
the formats JSONStore would be empty in the demo page.  Thus I assume my
problem to be around getting these formats into and out of the Printing
plugin.

Geoserver is installed using the default Windows setup.exe and is running
on Windows 7.  The plugin work was done on Mac OS X Mountain Lion because
this already had most of the requisites (mavern, eclipse, git, patch etc)
available and the output jar file was just copied across.  Geoserver
information is as follows

Version 2.2.5
Git Revision 8ab0318e82ed874a2198f7771ea85d52687ae3a2
Build Date 25-Feb-2013 11:43
GeoTools Version 8-SNAPSHOT (rev 2aa9dae0f9a3e7d926918b3873b5d1ec59ab5efe)

JVM version: Oracle Corporation: 1.7.0_25 (Java HotSpot(TM) Client VM)

Any help, thoughts or pointers would be greatly received.  Please let me
know if any other information is required.

Many thanks,

Ben Hayward-Browne
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to