This converts a Word document into a PDF document. It can be any Word document and does not have to be created using generateDoc or generateSupportingDoc. The protection level applicable to the Word document is not applicable to the PDF document.


API

Signature

convertWordDocToPDF

webService static Id convertWordDocToPDF(Id docId, String docFileName, Boolean addWatermark, Boolean removeWatermark, String headerText, String footerText, String sessionId, String serverUrl)
Request Parameters
NameTypeDescriptionRequired?
docIdIDThe id of the word document to be converted to PDF.Yes
docFileNameStringThe filename for the newly created PDF.Yes
addWatermarkBooleanIndicates whether a draft watermark should be added to the PDF.Yes
removeWatermarkBooleanIndicates whether a draft watermark on the source word document should be removed from the resulting PDF.Yes
headerTextStringThe header text to append to the document.Yes
footerTextStringThe footer text to append to the document.Yes
sessionIdStringThe Salesforce session id.Yes
serverUrlStringThe Salesforce server URL.Yes
Response Parameter
NameTypeDescription
resultIDThe id of the generated document.

Code Sample

Id docId = attachmentId;
String filename = 'newPDFFile.pdf';
Boolean addWatermark = 'true';
Boolean removeWatermark = 'false';
String headerText = 'This is Header';
String footerText = 'This is Footer';
String apiServerURL = System.Url.getSalesforceBaseUrl().toExternalForm() + '/services/Soap/u/50.0/' + UserInfo.getOrganizationId();
String SessionId = sessionId;  
Id convertedDocId = Apttus.MergeWebService.convertWordDocToPDF(docId, fileName,
addWatermark, removeWatermark, headerText, footerText, apiSessionId, apiServerURL);
CODE

Integration Details

Use the following information in your integrations with Apttus Contract Management Web Services API. For information on how to get started, refer to Integrating Conga CLM with External Systems.

API Prerequisites

None.

Request/Response XML

Example Request

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:mer="http://soap.sforce.com/schemas/class/Apttus/MergeWebService">
    <soapenv:Header>
        <mer:SessionHeader>
            <mer:sessionId>00D020000008lUh!AQYAQBDMUfqKvlqcVtqEnsqWZ3CvH_9PAn553rGgepU1CKttbRUAm4C8FFgTHrzkd6juez5FF4NEryvZ8ibJC__d7TM.vxCY</mer:sessionId>
        </mer:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
        <mer:convertWordDocToPDF>
            <mer:docId>068R0000001Z56SIAS</mer:docId>
            <mer:docFileName>MSA</mer:docFileName>
            <mer:addWatermark>True</mer:addWatermark>
            <mer:removeWatermark>False</mer:removeWatermark>
            <mer:headerText>Company</mer:headerText>
            <mer:footerText>Copyright 2020</mer:footerText>
            <mer:sessionId>00D020000008lUh!AQYAQBDMUfqKvlqcVtqEnsqWZ3CvH_9PAn553rGgepU1CKttbRUAm4C8FFgTHrzkd6juez5FF4NEryvZ8ibJC__d7TM.vxCY</mer:sessionId>
            <mer:serverUrl>https://testmanaged--5s20minor.my.salesforce.com/services/Soap/u/50.0/00D020000008lUh</mer:serverUrl>
        </mer:convertWordDocToPDF>
    </soapenv:Body>
</soapenv:Envelope>
XML

Example Response

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
        <convertWordDocToPDF>
            <result>a070S000002aDcuQAE</result>
        </convertWordDocToPDF>
    </soapenv:Body>
</soapenv:Envelope>
XML