Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

QueXML PDF icon

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 months 2 days ago #250658 by baxterdmutt
QueXML PDF icon was created by baxterdmutt
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.2.8
Own server.
Survey theme/template: thewnty-three
==================
Hello all; 
Where can I change the “Limesurvey” icon that get printed on the top left of the queXml pdf forms. It’s not picking it up from any of the image settings in the theme.  I can’t seem to find that answer anywhere. 
Also wondering if it’s possible to print the icon on every page. 

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 months 2 days ago #250659 by baxterdmutt
Replied by baxterdmutt on topic QueXML PDF icon
I’d like to add that I found a posting way back on version 4 (I think. Might have been 5. Can’t find it now) but it said that the option to add your own logo to QueXML was added to limesurvey. But I certainly can’t see where.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 1 day ago #250672 by Joffm
Replied by Joffm on topic QueXML PDF icon
Hi,
you find the code in "/application/libraries/admin/quexmlpdf.php"
Code:
protected function newPage($init = false)
    {
        $this->columnCP++; //increment the column pointer
 
        if ($init || ($this->columnCP >= $this->columns)) {
// if it is time for a new page
            $this->AddPage();
 
            //Set Auto page break to false
            $this->SetAutoPageBreak(false);
 
            $this->SetMargins(0, 0, 0);
            $this->SetHeaderMargin(0);
            $this->SetFooterMargin(0);
 
            $oTemplate = Template::model()->getInstance();
            $sLogoFileName = $oTemplate->filesPath . Yii::app()->getConfig('pdflogofile');
            if (file_exists($sLogoFileName)) {
                $result = LSYii_ImageValidator::validateImage($sLogoFileName);
                if (isset($result['check']) && $result['check'] == true) {
                    $sLogo = "@" . file_get_contents($sLogoFileName);
                    $this->Image($sLogo, 15, 5, 0, 7);
                }
            }
 

And as the function is "newPage" there should be the logo on each new page.

And you see: In the configuration file there is a setting to define the logo image.
In "/application/config/config-defaults.php"
Code:
$config['pdflogofile'] = 'logo_pdf.png'; // File name of logo for single answer export. Path is theme path, i.e. theme/default/logo_pdf.png.

So you may overwrite this in "config.php" to set your desired logo for the quexmlpdf.
Or you just save your logo as "logo_pdf.png.
 

I found a posting way back on version 4 (I think. Might have been 5. Can’t find it now)

Do you want us to search for it?

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 months 1 day ago #250682 by baxterdmutt
Replied by baxterdmutt on topic QueXML PDF icon
No need to search for it unless you want to. I thought it said that there was a setting to change the logo without going into config.php. I now feel like I must have misunderstood the post.
Thanks for you answer joffm

Please Log in to join the conversation.

  • baxterdmutt
  • baxterdmutt's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
7 months 1 day ago - 7 months 1 day ago #250683 by baxterdmutt
Replied by baxterdmutt on topic QueXML PDF icon
Here is the message talking about the custom logo on version 5
forums.limesurvey.org/index.php/forum/ge...-in-version-5#243122

The post is not in English and I don’t think it’s about the logo but it has a cut and paste section listing what’s new in version 5 and the custom logo for QueXML is in that part. 
Last edit: 7 months 1 day ago by baxterdmutt. Reason: Added more info.

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
7 months 1 day ago #250685 by Joffm
Replied by Joffm on topic QueXML PDF icon
Oh,
this was something that was introduced in 

Code:
Changes from 3.21.5 (build 200115) to 4.0.0 (build 200116) January 16, 2020
...
-New feature #14668: Custom logo at queXML export (Marko Bischof)
...

See here
[url] github.com/LimeSurvey/LimeSurvey/blob/ma...cs/release_notes.txt [/url]

And here you find the discussion about it.
[url] bugs.limesurvey.org/view.php?id=14668 [/url]

And if you open
[url] github.com/LimeSurvey/LimeSurvey/pull/1321 [/url]
you see that ist is exactly the part I showed already that is added.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: baxterdmutt

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose