[Geomoose-users] Print Templates

Bob Basques Bob.Basques at ci.stpaul.mn.us
Tue Oct 26 12:22:51 EDT 2010


did a negative number have any effect? 

bobb 




>>> "Sean Ziniker" <Sean.Ziniker at co.jefferson.or.us> wrote:


Well I finally got the justification to work on my print template. 
There is still one issue I am having but overall it works well.  I
wanted a title and subtitle for user inputs.  The title needed to be on
the left side of the template and the Subtitle on the right.  The
default is left justified so I needed to right justify the subtitle. 
The only way I could get it to work is to split them up in the print.php
file. I attached the code I worked with at around line 291 where it says
“# Render the text fields”.  The code between #SZ Start and #SZ End is
the code I added.  I basically had to add another “getElementsByTagName”
 and call it text1.  So anywhere within that chunk of code that referred
to  “text” I changed it to “text1”.  Then at the end of the code I added
there is a line that says “$pdf->Cell(0,.25,$printString,0,0,'R');”,
this is where I defined the justification.  If you look at the original
code it does not have the “,0,0,’R’” after “$printString”.  The R means
right, C would be for center if you wanted the text centered and L for
left.   


  


Now all I had to do is go into your letter_landscape.xml template and
change text to text1.  Below is what mine looks like: 


  


<text x=".47" y=".29" size="12" content="%title%"/> 


<text1 x="0" y=".29" size="10" content="%subtitle%"/> 


<text x="9.8" y="7.08" size="8" content="%date%"/> 


  


The one issue I am having though is once I have right justified text1 I
cannot move the x position.  So above where it says <text1 x="0", I
could have a 0 or 100 in the x= and it wont change the position.  The
reason I would like to is that when I right justify my text1 it sits
just a little bit outside my border.  I have also added a pdf of my
print. 


  


Thanks for your help Len. 


  


  


  


Sean Ziniker 



GIS Analyst
Jefferson County, Oregon
66 S.E. "D" Street, Suite B
Madras, OR97741
541.325.5083 Office
541.325.5089 Fax 




From: 

Len Kne [mailto:lkne at houstoneng.com]

Sent: 

Friday, October 22, 2010 1:32 PM

To: 

Sean Ziniker; geomoose-users at lists.sourceforge.net

Subject: 

RE: Print Templates 



  


This is possible, but you are going to have to edit print.php.  The
library GeoMOOSE uses for printing PDFs is at, http://www.fpdf.org/. 
Look for “cell” in the documentation and print.php – you should be able
to set the justification. 


  


Len 


  


From: 

Sean Ziniker [mailto:Sean.Ziniker at co.jefferson.or.us]

Sent: 

Friday, October 22, 2010 3:12 PM

To: 

geomoose-users at lists.sourceforge.net

Subject: 

[Geomoose-users] Print Templates 


  


I was just wondering if there is a way to align a subtitle on the right
side on my custom print template.  I am using something that looks like
this in my .xml: 


  


<text x="-.47" y=".29" size="14" content="%subtitle%"/> 


  


Is there a way to put a right align within the text tag so longer
subtitles will not run off the page. 


  


Thanks, 


  


Sean Ziniker 



GIS Analyst
Jefferson County, Oregon
66 S.E. "D" Street, Suite B
Madras, OR97741
541.325.5083 Office
541.325.5089 Fax 



  

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


More information about the Geomoose-users mailing list