[Geomoose-users] Print to PDF - quick work around

Mark Volz MarkVolz at co.lyon.mn.us
Thu Nov 6 10:56:27 EST 2008


Rick,

 

I was able to get the DRGS to print when I have the image format specified in
the map file as such.

 

MAP

  NAME 'LMIC DRG'

  #SIZE 800 650

  STATUS ON

  #EXTENT 521296 156295 674419 295679

  UNITS FEET

  IMAGETYPE JPEG

  TRANSPARENT TRUE

 

  WEB

 

 

 

 

Mark Volz

GIS Specialist

Lyon County, MN

(507) 532-8218

My other question now is;  I am trying to get the LMIC's USGS DRG's to print
but I get an error when I try that.  I have narrowed the culprit down to the
PrintWMS.map file in Resources.  The aerial photos from LMIC come in as
jpeg's and the printwms.map can handle because of the reference to this image
type("wms_format" "image/jpeg".  However, the DRG's are sent from LMIC as
PNG's.  The printwms.map cannot handle these unless I change the "wms_format"
to image/png.  When I do this then the aerial photos don't print.

 

Is there a way to adjust the printwms.map file to accept both of these
formats from LMIC?  I would guess this would be a problem for everyone trying
to print these.  Although maybe a lot of people have not tried to print out
the drg's on a map.

 

I have included the printwms.map file for reference.

 

MAP

      LAYER

            NAME "wms_temp"

            TYPE RASTER

            STATUS DEFAULT

            CONNECTION "url"

            CONNECTIONTYPE WMS

            METADATA

                  "wms_srs" ""

                  "wms_name" ""

                  "wms_server_version" ""

                  "wms_format" "image/jpeg"

            END

      END

END

 

Thanks,

 

Rick Moore

GIS Specialist

 

Water Resources Center

184 Trafton Science Center South

Minnesota State University, Mankato

Mankato, MN   56001

 

(507) 389-3267

richard.moore at mnsu.edu

From: Fischer, Brian [mailto:bfischer at houstonengineeringinc.com]

Sent: Wednesday, November 05, 2008 9:31 PM

To: Moore, Richard J; geomoose-users at lists.sourceforge.net

Subject: RE: [Geomoose-users] Print to PDF

 

Rick,

 

This is one of the gotcha's with the demo's.  Currently there is only one
configuration.php file for both demo's.  I decided rather than create the
extra files I would need to get both working I would just leave it working
for the county demo.

 

If you want to get the printing working in both demo's you would need to
duplication the configuration.php and print.php files and change the path in
the configuration.php file to reference the state_demo  mapfiles.  Then
change the include file in the print.php file to point to the other
configuration file (something like config_statedemo.php).  I don't have the
files with me know but if you need an example I could create one for you.

 

Hope this helps,

Brian

 

From: Moore, Richard J [mailto:richard.moore at mnsu.edu]

Sent: Wednesday, November 05, 2008 4:37 PM

To: 'geomoose-users at lists.sourceforge.net'

Subject: [Geomoose-users] Print to PDF

 

I am having problems with the Print to PDF in the State Demo example.

 

If I run the Print to PDF in the County Demo application it works perfectly
but when I try it in the State Demo application, I get this error message.

 

 

Available Printing Formats:

 

Warning: [MapServer Error]: msLoadMap():
(/ms4w/apps/geomoose/maps_countydemo/./parks/parks_8bit.map) in
C:\ms4w\apps\GeoMOOSE\htdocs\php\print.php on line 177

 

Warning: Failed to open map file
/ms4w/apps/geomoose/maps_countydemo/./parks/parks_8bit.map in
C:\ms4w\apps\GeoMOOSE\htdocs\php\print.php on line 177

 

Fatal error: Call to a member function setSize() on a non-object in
C:\ms4w\apps\GeoMOOSE\htdocs\php\print.php on line 178

 

 

 

It seems like it is referencing a path location to the county demo
application as show by the path.  I haven't been able to find a location that
states where to look for the files when it prints.

 

Any assistance would be helpful since it seems like it is a problem with the
State Demo application since the County demo works.  Also I do have FPDF
installed since the County Demo works for me.

 

Thanks,

 

Rick Moore

GIS Specialist

 

Water Resources Center

184 Trafton Science Center South

Minnesota State University, Mankato

Mankato, MN   56001

 

(507) 389-3267

richard.moore at mnsu.edu

-------------- next part --------------

An HTML attachment was scrubbed...

-------------- next part --------------

A non-text attachment was scrubbed...

Name: Rick Moore (richard.moore at mnsu.edu).vcf

Type: text/x-vcard

Size: 630 bytes

Desc: Rick Moore (richard.moore at mnsu.edu).vcf

 

------------------------------

 

Message: 3

Date: Thu, 6 Nov 2008 09:45:48 -0600

From: "Fischer, Brian" <bfischer at houstonengineeringinc.com>

Subject: Re: [Geomoose-users] Print to PDF

To: "Moore, Richard J" <richard.moore at mnsu.edu>,

      <geomoose-users at lists.sourceforge.net>

Message-ID:

 
<2EF6E1058C047344B4DE0FD141119167D1C9BA at hex01.houstonengineeringinc.com>

      

Content-Type: text/plain; charset="us-ascii"

 

Rick,

 

 

 

Your right I have never tried to print the DRGs.  Dan would know better

than I would what your options might be to get around this.  It might

involve code changes to print.php.

 

 

 

-Brian

 

 

 

From: Moore, Richard J [mailto:richard.moore at mnsu.edu] 

Sent: Thursday, November 06, 2008 9:37 AM

To: Fischer, Brian; geomoose-users at lists.sourceforge.net

Subject: RE: [Geomoose-users] Print to PDF

 

 

 

Brian,

 

 

 

Thanks for the information.  I was able to create a configuration.php

and print.php file for each of the applications I have and then just

changed the reference to the print.php file in my application.xml file

in htdocs.

 

 

 

My other question now is;  I am trying to get the LMIC's USGS DRG's to

print but I get an error when I try that.  I have narrowed the culprit

down to the PrintWMS.map file in Resources.  The aerial photos from LMIC

come in as jpeg's and the printwms.map can handle because of the

reference to this image type("wms_format" "image/jpeg".  However, the

DRG's are sent from LMIC as PNG's.  The printwms.map cannot handle these

unless I change the "wms_format" to image/png.  When I do this then the

aerial photos don't print.

 

 

 

Is there a way to adjust the printwms.map file to accept both of these

formats from LMIC?  I would guess this would be a problem for everyone

trying to print these.  Although maybe a lot of people have not tried to

print out the drg's on a map.

 

 

 

I have included the printwms.map file for reference.

 

 

 

MAP

 

      LAYER

 

            NAME "wms_temp"

 

            TYPE RASTER

 

            STATUS DEFAULT

 

            CONNECTION "url"

 

            CONNECTIONTYPE WMS

 

            METADATA

 

                  "wms_srs" ""

 

                  "wms_name" ""

 

                  "wms_server_version" ""

 

                  "wms_format" "image/jpeg"

 

            END

 

      END

 

END

 

 

 

Thanks,

 

 

 

Rick Moore

 

GIS Specialist

 

 

 

Water Resources Center

 

184 Trafton Science Center South

 

Minnesota State University, Mankato

 

Mankato, MN   56001

 

 

 

(507) 389-3267

 

richard.moore at mnsu.edu

 

From: Fischer, Brian [mailto:bfischer at houstonengineeringinc.com] 

Sent: Wednesday, November 05, 2008 9:31 PM

To: Moore, Richard J; geomoose-users at lists.sourceforge.net

Subject: RE: [Geomoose-users] Print to PDF

 

 

 

Rick,

 

 

 

This is one of the gotcha's with the demo's.  Currently there is only

one configuration.php file for both demo's.  I decided rather than

create the extra files I would need to get both working I would just

leave it working for the county demo.

 

 

 

If you want to get the printing working in both demo's you would need to

duplication the configuration.php and print.php files and change the

path in the configuration.php file to reference the state_demo

mapfiles.  Then change the include file in the print.php file to point

to the other configuration file (something like config_statedemo.php).

I don't have the files with me know but if you need an example I could

create one for you.

 

 

 

Hope this helps,

 

Brian

 

 

 

From: Moore, Richard J [mailto:richard.moore at mnsu.edu] 

Sent: Wednesday, November 05, 2008 4:37 PM

To: 'geomoose-users at lists.sourceforge.net'

Subject: [Geomoose-users] Print to PDF

 

 

 

I am having problems with the Print to PDF in the State Demo example.

 

 

 

If I run the Print to PDF in the County Demo application it works

perfectly but when I try it in the State Demo application, I get this

error message.

 

 

 

 

 

Available Printing Formats:

 

Warning: [MapServer Error]: msLoadMap():

(/ms4w/apps/geomoose/maps_countydemo/./parks/parks_8bit.map) in

C:\ms4w\apps\GeoMOOSE\htdocs\php\print.php on line 177

 

Warning: Failed to open map file

/ms4w/apps/geomoose/maps_countydemo/./parks/parks_8bit.map in

C:\ms4w\apps\GeoMOOSE\htdocs\php\print.php on line 177

 

Fatal error: Call to a member function setSize() on a non-object in

C:\ms4w\apps\GeoMOOSE\htdocs\php\print.php on line 178

 

 

 

 

 

 

 

It seems like it is referencing a path location to the county demo

application as show by the path.  I haven't been able to find a location

that states where to look for the files when it prints.

 

 

 

Any assistance would be helpful since it seems like it is a problem with

the State Demo application since the County demo works.  Also I do have

FPDF installed since the County Demo works for me.

 

 

 

Thanks,

 

 

 

Rick Moore

 

GIS Specialist

 

 

 

Water Resources Center

 

184 Trafton Science Center South

 

Minnesota State University, Mankato

 

Mankato, MN   56001

 

 

 

(507) 389-3267

 

richard.moore at mnsu.edu

 

-------------- next part --------------

An HTML attachment was scrubbed...

 

------------------------------

 

-------------------------------------------------------------------------

This SF.Net email is sponsored by the Moblin Your Move Developer's challenge

Build the coolest Linux based applications with Moblin SDK & win great prizes

Grand prize is a trip for two to an Open Source event anywhere in the world

http://moblin-contest.org/redirect.php?banner_id=100&url=/

 

------------------------------

 

_______________________________________________

Geomoose-users mailing list

Geomoose-users at lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/geomoose-users

 

 

End of Geomoose-users Digest, Vol 14, Issue 20

**********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20081106/6cd98acb/attachment.html


More information about the Geomoose-users mailing list