paper-docxAPI referenceopc.oxml
CT_Default
paper-docx 0.2.0 API reference
<Default> element that appears in [Content_Types].xml part.
Used to specify a default content type to be applied to any part with the specified extension.
Attributes
content_type
attributecontent_typeString held in the ContentType attribute of this <Default>
element.
extension
attributeextensionString held in the Extension attribute of this <Default> element.
xml
attributexmlstrReturn XML string for this element, suitable for testing purposes.
Pretty printed for readability and without an XML declaration at the top.
Functions
new
funcnew(ext: str, content_type: str)Return a new <Default> element with attributes set to parameter values.
paramextstrparamcontent_typestr