Resizing Images in PDF Manager
Overview
Sugar's PDF Manager empowers Sugar® administrators to customize the PDF templates used to generate PDFs from Sugar records such as quotes. This article will discuss how to size images in PDF templates in order to achieve the intended image size on the printed PDF.
Prerequisites
You must be an administrator or have developer-level role access to make the necessary changes in Admin > PDF Manager.
Use Case
As an example, we will take an image that is 867 pixels wide by 74 pixels tall and size it to print on the PDF as 4 inches wide. We will add the image to the stock quote PDF template.
Steps to Complete
Computing the Desired Size
First, we need to determine the desired size of our image on the PDF template in units of points, not pixels. Current printers print pixels anywhere from 300 to 2400 dots per inch, so we need to specify our desired size in points to ensure our desired size on the printed page. At 72 points (pt) per inch, PDFs automatically size a point to 1/72 of an inch. To achieve a printed size of 4 inches wide, we multiply 4 by 72 for a width of 288 points. We will not calculate or enter the height dimension so that Sugar will automatically keep the height in proportion to the width.
Sizing the Image on the PDF Template
Now that we have determined the desired image size in points, we can resize it on the PDF template:
- Navigate to Admin > PDF Manager.
- Open the PDF template and click the Edit button.
- As you are viewing the PDF template, click on the graphic you wish to resize. Please note that although handles will appear on the graphic to show it is selected, we will not use the handles to resize the image.
- Click the Insert/Edit Image icon.
- In the Insert/Edit Image dialog, provide the width dimension calculated above ("288pt" for our example). Width goes in the first box and height in the second, but we will only provide one dimension so that Sugar automatically keeps the image in proportion. Then, click the Update button.
Note: After resizing, the graphic may not appear to be the correct size in the PDF template editor, but its appearance in the editor does not represent the printed PDFs proportions. - Test the image size by saving the template and then selecting "Preview" from the record's Actions menu.
Note: You can also view the template with actual data by navigating to a quote or relevant record and selecting "Download PDF" from the Actions menu.