How can I change the SugarCRM image on the PDF quote template?

I have an image that I want to use. I want to upload the image to Sugar instead of hosting it somewhere else. How can I upload it to Sugar so it is available to the PDF manager?

Parents Reply
  • The problem I'm having is that I want the image to be uploaded to the Sugar file structure.  The image needs to be stored in Sugar. You can't just copy and paste an image into the PDF layout.

    The default image is stored in ./themes/default/images/pdf_logo.jpg.  I want to know how/if I can upload an image to that folder in Sugar.  

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  
Children
  • Ah, are you on one of the commercial On-Demand versions? Seems like you could package up a Manifest with your logo file and upload it that way. Take a look here for copying files to Sugar using the Module Loader and creating manifest files:

    https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.6/API/Application/Module_Loader/Packa…

  • Hi John,

    One method to upload a new logo file is by going to Admin > PDF Manager. Once that page is loaded, click the 'PDF Manager' option in the top navigation bar and select 'Edit Report PDF Template'.

     {SugarClub Administrator Edit: We're sorry, but this image is no longer available}  

    From that page, you can choose your desired image file and click 'Save' to upload it. Once the file is uploaded, it is renamed as pdf_logo_<original filename>.

    In my example, the file I chose was named 'sugarcrm_support.png', so when it was uploaded, it was renamed as 'pdf_logo_sugarcrm_support.png'.

    Now, with that file uploaded, you can edit your PDF template and change the image URL to:

    ./custom/themes/default/images/pdf_logo_<original filename>

    So again, for my example, the path I entered was './custom/themes/default/images/pdf_logo_sugarcrm_support.png' and the image was immediately reflected in the template.

    You can upload as many image files as you desire through this method as long as the image files have unique filenames. If an image file is uploaded with a previously used filename, it will just overwrite the previous image on the file system. Please remember that your last uploaded image will serve as the logo for any generated PDFs for the Reports module.

    This isn't a clear solution for users coming across this hurdle, so I created the following idea: Provide a Utility for Managing Images for PDF Templates . I encourage you to vote on the idea and add any additional feedback you have on how we can make this a more useful utility for you in a future release of Sugar.

    Kind regards,

    Chris

  • Chris Raffle  Thank you!  This is exactly what I was looking for. My next step was to build and upload a Sugar package, which seems to be overkill to change an image.

    I think the documentation should also be updated to include these instructions.

  • Hi Chris,

    Following your instruction and inserting the path as the image source witing PDF manager I get the following error when tring to preview the PDF

    TCPDF ERROR: [Image] No such file or directory in ./custom/themes/default/images/pdf_logo_pvalve1.png

    any ideas why would be appreciated.

    thank you

    .

    CRM Business Consultant