public class MSOUtils extends Object
Constructor and Description |
---|
MSOUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
fillTemplate(InputStream input,
HashMap<String,String> model,
OutputStream output)
Fill DOCX template
|
static void |
fillTemplate(String token,
String docId,
HashMap<String,String> model,
String dstPath)
Fill document template.
|
static void |
generateSample(int paragraphs,
OutputStream os)
Generate sample docx
|
public static void fillTemplate(InputStream input, HashMap<String,String> model, OutputStream output) throws FileNotFoundException, org.docx4j.openpackaging.exceptions.Docx4JException, JAXBException, IOException
FileNotFoundException
org.docx4j.openpackaging.exceptions.Docx4JException
JAXBException
IOException
public static void fillTemplate(String token, String docId, HashMap<String,String> model, String dstPath) throws LockException, PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException, IOException, org.docx4j.openpackaging.exceptions.Docx4JException, JAXBException, FileSizeExceededException, UserQuotaExceededException, VirusDetectedException, VersionException, ExtensionException, UnsupportedMimeTypeException, ItemExistsException, AutomationException
token
- Authentication info.docId
- The path that identifies an unique document or its UUID.model
- A map with the template keys and values.dstPath
- The path of the resulting PDF document (with the name).LockException
PathNotFoundException
AccessDeniedException
RepositoryException
DatabaseException
IOException
org.docx4j.openpackaging.exceptions.Docx4JException
JAXBException
FileSizeExceededException
UserQuotaExceededException
VirusDetectedException
VersionException
ExtensionException
UnsupportedMimeTypeException
ItemExistsException
AutomationException
public static void generateSample(int paragraphs, OutputStream os) throws Exception
Exception
Copyright © 2016. All rights reserved.