Hi guys,

Do the following in order to have a north arrow on your PDF print:

1) /common/print.xml
Add the following line into the <pdf> tag
<north_arrow>./images/logos/northarrow.png</north_arrow>

2) /incphp/print/pdfprint.php
Add the following lines into the printPDF function, likely at the end
//North Arrow on map
$northArrow = $this->pdfSettings['north_arrow'];
$imsize = getimagesize($northArrow);
list($pixw, $pixh) = $imsize;
$nortArrowWidth = $pixw * $redFactor2;
$nortArrowHeight = $pixh * $redFactor2;
$this->Image($northArrow, $this->xmaxM-$nortArrowWidth-10,
$this->topLineY+10, 0, $nortArrowHeight);

If you want a bigger arrow, replace $redFactor2 with $redFactor.

Cheers,
Chris

On Tue, Jan 22, 2013 at 5:20 PM, Serge Claudio Rafanoharana <
rafanohar...@gmail.com> wrote:

> Dear Chris,
>
> Thanks, I'll give it a try.
>
> Cheers,
> Serge
>
>
> On Tue, Jan 22, 2013 at 9:33 PM, Chris forum <bak.fo...@gmail.com> wrote:
>
>> Hi Serge, Thomas,
>>
>> As I don't really like having a north arrow on my map, I have added the
>> north arrow for the printing only.
>> So far it only works for the HTML printing, I am working on the PDF print
>> now and will let you know when (if) I get it to work.
>>
>> In /config/common/print.xml, inside the print_map_image DIV, add:
>> <div id="print_north_arrow"><img src="images/logos/northarrow.png"
>> alt="north_arrow" style="position:absolute; right:10px; top:10px"/></div>
>>
>> Chris
>>
>>
>> On Tue, Jan 22, 2013 at 3:21 PM, Serge Claudio Rafanoharana <
>> rafanohar...@gmail.com> wrote:
>>
>>> Dear Thomas,
>>>
>>> Changing the STATUS to ON and adding the layer in config resolved the
>>> problem. Meaning that I have to check/uncheck to enable/disable it. I
>>> don't
>>> know what's wrong with the STATUS DEFAULT.
>>>
>>> Both gif and png work fine. Other symbols (circle...) work fine as well.
>>> I
>>> think I will make this layer always ON (checked) and users would not be
>>> able to check or uncheck it. I think it is possible but I need to figure
>>> it
>>> out (I forget).
>>>
>>> Thank you,
>>>
>>> Cheers,
>>> Serge
>>>
>>> On Tue, Jan 22, 2013 at 8:54 PM, Thomas RAFFIN <traf...@sirap.fr> wrote:
>>>
>>> > Yes, try with  SYMBOL 'circle'
>>> >
>>> > Le 22/01/2013 14:43, Serge Claudio Rafanoharana a écrit :
>>> > > Dear Thomas,
>>> > >
>>> > > What do you mean with other symbol? Do you mean change the
>>> > > STYLE
>>> > >            SYMBOL 'northarrow'
>>> > >
>>> > > to something like
>>> > > STYLE
>>> > >            SYMBOL 'circle'
>>> > > ?
>>> > >
>>> > > I tried with gif but it is the same, nothing.
>>> > > Yes, it is the last layer declared in the map file. I have no problem
>>> > > with other layers.
>>> > >
>>> > > PS: no php error.
>>> > >
>>> > >
>>> > > Cheers,
>>> > > Serge
>>> > >
>>> > >
>>> > > On Tue, Jan 22, 2013 at 7:54 PM, Thomas RAFFIN <traf...@sirap.fr
>>> > > <mailto:traf...@sirap.fr>> wrote:
>>> > >
>>> > >     Else the other objects will be drawn
>>> > >
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > Serge
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>>> > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>>> > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>>> > MVPs and experts. ON SALE this month only -- learn more at:
>>> > http://p.sf.net/sfu/learnnow-d2d
>>> > _______________________________________________
>>> > pmapper-users mailing list
>>> > pmapper-users@lists.sourceforge.net
>>> > https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>> >
>>>
>>>
>>>
>>> --
>>> Serge
>>>
>>> ------------------------------------------------------------------------------
>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>>> MVPs and experts. ON SALE this month only -- learn more at:
>>> http://p.sf.net/sfu/learnnow-d2d
>>> _______________________________________________
>>> pmapper-users mailing list
>>> pmapper-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>>
>>
>>
>
>
> --
> Serge
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to