Class FontTablePart
java.lang.Object
org.docx4j.openpackaging.Base
org.docx4j.openpackaging.parts.Part
org.docx4j.openpackaging.parts.JaxbXmlPart<Fonts>
org.docx4j.openpackaging.parts.WordprocessingML.FontTablePart
public final class FontTablePart extends JaxbXmlPart<Fonts>
-
Field Summary
Fields inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
jaxbElement, jc, MAX_BYTES_Unmarshal_Error -
Constructor Summary
Constructors Constructor Description FontTablePart()FontTablePart(PartName partName) -
Method Summary
Modifier and Type Method Description voiddeleteEmbeddedFontTempFiles()Temporary embedded fonts should be deleted on exit, but for a long running app that may not be adequate, in which case you'll want to invoke this method when you have finished with a WordML pkg.voidinit()static voidmain(java.lang.String[] args)voidprocessEmbeddings()voidprocessEmbeddings(Mapper fontMapper)java.lang.ObjectunmarshalDefaultFonts()Unmarshal a default font table, useful when creating this part from scratch.Methods inherited from class org.docx4j.openpackaging.parts.JaxbXmlPart
addMcChoiceNamespace, getContents, getJAXBContext, getJaxbElement, getMcChoiceNamespaces, getMceIgnorable, getXML, isContentEqual, isUnmarshalled, marshal, marshal, marshal, marshal, pipe, pipe, pipe, setContents, setJAXBContext, setJaxbElement, setJaxbElement, setMceIgnorable, transform, unmarshal, unmarshal, variableReplaceMethods inherited from class org.docx4j.openpackaging.parts.Part
getContentLengthAsLoaded, getOwningRelationshipPart, getPackage, getRelationshipType, getSourceRelationship, getSourceRelationships, getVersion, remove, rename, setContentLengthAsLoaded, setOwningRelationshipPart, setPackage, setPartShortcut, setRelationshipType, setSourceRelationship, setVersionMethods inherited from class org.docx4j.openpackaging.Base
addTargetPart, addTargetPart, addTargetPart, addTargetPart, getContentType, getPartName, getRelationshipsPart, getRelationshipsPart, getUserData, reset, setContentType, setPartName, setRelationships, setUserData
-
Constructor Details
-
FontTablePart
- Throws:
InvalidFormatException
-
FontTablePart
- Throws:
InvalidFormatException
-
-
Method Details
-
init
public void init() -
unmarshalDefaultFonts
public java.lang.Object unmarshalDefaultFonts() throws javax.xml.bind.JAXBExceptionUnmarshal a default font table, useful when creating this part from scratch.- Returns:
- the newly created root object of the java content tree
- Throws:
javax.xml.bind.JAXBException- If any unexpected errors occur while unmarshalling
-
processEmbeddings
public void processEmbeddings() -
processEmbeddings
-
deleteEmbeddedFontTempFiles
public void deleteEmbeddedFontTempFiles()Temporary embedded fonts should be deleted on exit, but for a long running app that may not be adequate, in which case you'll want to invoke this method when you have finished with a WordML pkg. You can get this part from your MainDocumentPart, using getFontTablePart() -
main
public static void main(java.lang.String[] args) throws java.lang.Exception- Throws:
java.lang.Exception
-