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?
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'.
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:
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.
I think this documentation will help you out.
Thanks, Haiyin. My description wasn't very clear.
I want to replace the embedded Sugar image at the top of the PDF template. If you add an image to the header file, the image is distorted. I just want to replace the image that is already there.
While editing the template, if you click on the Sugar image the Insert/Edit Image option will highlight itself on the editing toolbar. Click that button and it will open up the image options where you can replace the Image URL with whatever you like.
It should work the same if you also delete the default Sugar image and insert your own in its place.
Similar steps are shown on the guide here, but instead of changing the size you can change the URL:
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.
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:
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.
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.
Very frustrating trying to insert an image with available tools. Able to add an image in "Edit" mode, but once save is selected, the image disappears or breaks its link. Finally got it to work.
Cut/past logo to Paint.
Added text for address. Used 22 font for company name and 14 font for address.
Experimented many times with font type and sizes due to distortion upon pasting.
Maximized dimensions in Paint for 850 x 150px. Saved in .png format.
Save image as the system setting logo.
Copied URL address from lower bottom corner into the URL box in the .pdf manager template.
Had to adjust preset "Quote #" columns. Label column set at 40% and data column set at 60%.
Adjusted quoted line item columns to show only list and extended price;
Qty = 150px, Part No. = 120%, Quote line = 240%, List Price = 85%, Ext. Price = 85%
Retrieving data ...