| Show: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
ConvertController
Signature
global with sharing class ConvertController
ConvertController Methods
convert(data)
Convenient method that converts a DocConfig and returns the ContentVersionId or AttachmentId
Signature
webService static String convert(ConvertDataModel data)
Parameters
data
Type:
ConvertDataModel
ConvertDataModel instance to use
Returns
ContentVersionId or AttachmentId (dependent on Delivery Type on DocConfig)
See
Example
convertAura(data)
Signature
@AuraEnabled
global static String convertAura(ConvertDataModel data)
convertStandaloneDocToPDF(fileName, document, pdfAction)
Convert DOCX to PDF
Signature
@AuraEnabled
global static String convertStandaloneDocToPDF(String fileName,Blob document,String pdfAction)
Parameters
fileName
Type:
String
docx file name
document
Blob of DOCX file
pdfAction
always 'NONE' for now, as we do not support merging PDF's in this method
Returns
JSON String
convertStandaloneDocToPDFV2(fileName, document, pdfAction, packId, locale, alternativeName)
Signature
@AuraEnabled
global static String convertStandaloneDocToPDFV2(String fileName,Blob document,String pdfAction,String packId,String locale,String alternativeName)
convertToDocx(docConfigId, objectId)
Signature
webService static String convertToDocx(Id docConfigId, Id objectId)
Deprecated
use cadmus_core.ConvertController.convertWithWrapper(data)
convertToDocxAura(docConfigId, objectId)
Signature
@AuraEnabled
global static String convertToDocxAura(Id docConfigId, Id objectId)
convertToPdf(docConfigId, objectId)
Signature
webService static String convertToPdf(Id docConfigId, Id objectId)
Deprecated
use cadmus_core.ConvertController.convertWithWrapper(data)
convertToPdfAura(docConfigId, objectId)
Signature
@AuraEnabled
global static String convertToPdfAura(Id docConfigId, Id objectId)
Deprecated
use cadmus_core.ConvertController.convertWithWrapper(data)
convertWithWrapper(data)
Convert DocConfig or Pack defined in the ConvertDataModel
Signature
webService static DocGenerationWrapper convertWithWrapper(ConvertDataModel data)
Parameters
data
Type:
ConvertDataModel
ConvertDataModel instance to use
Returns
DocGenerationWrapper
See
Example
convertWithWrapperAndInputMap(data, inputMap)
Convert DocConfig or Pack defined in the ConvertDataModel with variables and datasources included via the inputMap
Signature
global static DocGenerationWrapper convertWithWrapperAndInputMap(ConvertDataModel data, Map<String, Object> inputMap)
Parameters
data
Type:
ConvertDataModel
ConvertDataModel instance to use
inputMap
Type:
Map<String, Object>
Map<String, Object) Map that can include extra key/value datasources, parameters for SOQL DataSources, ...
Returns
DocGenerationWrapper
See
Example
fileUploader(datas)
Method that will take the File identified by the ContentVersion Id and upload that to eg SharePoint
Signature
global static UtilClasses.FileUploadResponse fileUploader(List<UtilClasses.FileUploadData> datas)
Parameters
datas
Type:
List<UtilClasses.FileUploadData>
List of files to upload
Returns
extra data, if available on the upload
Example
mergePdfs(pdfMergeInput)
Method will take pdfs as input and merges them into a new PDF. This method is prone to SFDC heapsize limits
Signature
global static UtilClasses.PdfMergeResult mergePdfs(UtilClasses.PdfMergeInput pdfMergeInput)
Parameters
pdfMergeInput
Type:
UtilClasses.PdfMergeInput
List of files to merge
Returns
extra data, if available on the merge
Example
ConvertController.ConvertDataModel
Class to capture all required convert data
Signature
global with sharing class ConvertDataModel
Example
ConvertController.ConvertDataModel Properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||