Create PDF-Upload Templates


The S-Docs PDF-Upload feature allows you to upload any preexisting PDF to the S-Docs template editor. Once your PDF is uploaded, you can use the intuitive user interface to drag and drop merge fields onto your document. There's no need to copy and paste when using this feature: simply grab the merge field and place it wherever you'd like. This article will explain how to access the PDF-Upload feature, navigate the user interface, and customize your merge fields with your own styling. Before we dive in, here's a quick look at the feature in action:

Access PDF-Upload

To access the PDF-Upload feature, you'll need to add it as a Template Format value on the SDoc Template object. From the setup menu, navigate to the Object Manager and find the SDoc Template object.

Next, navigate to the Fields and Relationships tab, and click on the Template Format field.

Scroll down to the Values section and click New. Type PDF-UPLOAD into the text box, then click Save.

You've now successfully added the PDF-Upload option to the Template Format field. To create your first PDF-Upload template, simply select this option as your template format.

Using PDF-Upload

We will now go over basic usage of the PDF-Upload feature. To begin, navigate to the Template Editor for your PDF-Upload template. [1] Use the PDF File Quality field to choose a quality from Full, High (1.0), Medium (0.7), and Low (0.4). Higher quality equates to larger file sizes. Then, [2] click Upload PDF File and choose a PDF.

Note: The PDF File Quality field is available in S-Docs version 4.535+

Your PDF will appear on the right, and options will appear in the left menu.

PDF-Upload Settings

The two menus available to you are [1] S-Docs Fields, which is where you'll select your merge fields to drag and drop, and [2] PDF-Upload Settings, which we'll go over now.

The PDF-Upload Settings allow you to [3] apply a default style for how all of your merge field data will display. This styling box accepts CSS syntax. For example, if we want our merge field text to be 20 pixels, we'd add font-size: 20px; into the box. This styling can also be overridden for any individual merge field.

You can also [4] input a LineItemsSOQL statement with <queryname> tags into the Named Queries field to use Named Queries in your PDF-Upload template. Input your query merge field syntax in the Merge Field field (described in the next section). Click here for more information on named queries.

S-Docs Fields

The S-Docs Fields menu allows you to create merge fields, apply individual styling, write conditional statements for those fields, and drag and drop them onto your document. If your PDF-Upload template is S-Sign enabled, this menu is also where you'll configure your signature tags. Click Create Another Field to get started.

This is the merge field menu.

Begin by [1] selecting the type of field. In this case, we're going to select merge field. If S-Sign was enabled for this template, we could also use this picklist to choose an S-Sign field. Next, [2] click Select Merge Field to find your merge field.

This will [1] bring up a list of all available fields for your base object, which in this case is Opportunity. You can also [2] select special merge fields to insert information such as document date, document name, or the name of the user generating the document. When you [3] select your merge field, you can access fields from related objects by clicking on fields with the > symbol next to them, just like you can with any other S-Docs template. This functionality allows you to go three levels deep. In this example, we're selecting the billing address for the account related to this opportunity. When you find your desired field, [4] click Insert Field.

As you can see, [1] the merge field was added into the Merge Field text area, meaning that this field will now display data from this opportunity's account billing address.

Remember the default merge field styling we applied earlier? You can [2] override this styling by adding additional CSS in the Additional Style field. If the default font size is 20 pixels, we could add font-size: 12px; here so that this field appears smaller than the rest. This field can also restrict the width of longer text inputs and cause text to wrap, for example: white-space: normal !important; max-width: 300px

You can additionally [3] insert conditional logic in the Render If field to render this field data only under certain conditions. This field accepts the same syntax as the S-Docs Conditional Logic feature, omitting the render tags. For example, let's say we only want the account's billing address to display if the opportunity is closed. We would add {{!Opportunity.stagename}} == 'Closed' into this field.

Finally, [4] drag your field (SDOCS INPUT ID=1) and place it on your PDF. Once you do, you can reset this field by clicking the Re-Drag Merge Field button, then drag it again. If you no longer need a field, you can [5] click Delete Field to delete it. [6] Click Create Another Field to repeat this process as many times as you'd like; there's no limit to the amount of merge fields you can use!

Once you've added all of your merge fields, it's time to generate your document!

As you can see, S-Docs merged in all of our Salesforce data in the areas that we specified. That's all there is to it! The PDF-Upload feature was designed to give you maximum flexibility and ease of use while maintaining the powerful feature functionality of S-Docs.

Note that the PDF-Upload templates work with the Live Edit feature. If your PDF-Upload template is Live-Edit enabled, users will be able to edit the field data after the document is generated.

PDF-Upload Limitations

While PDF-Upload is a robust and easy-to-use feature, there are a few limitations to consider when using it.

Note: Limitations to PDF files in general also apply to the PDF-Upload feature in addition to the limitations listed here.
  • PDF is the only file type supported
  • Pre-existing templates cannot be switched to the PDF-Upload template format
  • PDF-Upload templates cannot be switched to a different template format
  • The HeaderFooterPage Settings, and Create Salesforce Task tabs are not available
  • PDFs must be the traditional 8.5 x 11 inch size; landscape PDFs are not supported
  • The page count upper limit is currently around 15 pages. Keep in mind that certain contents increase template size and complexity (such as images or large amounts of text), which may have an effect on the page number limitation
  • To export templates and transfer them between orgs, use the S-Docs Template Migrator instead of manually exporting and importing the template data.
  • Component templates are not supported (however, you can use PDF-Upload templates as components in regular PDF templates)
  • Related Lists are not supported
  • Conditional statements need to be written out (the Insert Conditional Logic button is not supported)
  • Nested renders are not supported
  • Direct SOQL related lists are not supported
  • Merged text will not wrap (will flow off of the side of a page) without entering the following to the Additional Style field:
    white-space: normal !important;

Tags: , , ,

Was this helpful?