Package org.docx4j.openpackaging.contenttype

Examples of org.docx4j.openpackaging.contenttype.ContentType


   * @param contentTypeManager
   *            The content type manager to use
   */
  public SpreadsheetMLPackage(ContentTypeManager contentTypeManager) {
    super(contentTypeManager);
    setContentType(new ContentType(ContentTypes.PRESENTATIONML_MAIN));
  }
View Full Code Here


      in = partByteArrays.get(resolvedPartUri).getInputStream();
      part = new BinaryPart( new PartName("/" + resolvedPartUri));
     
      // Set content type
      part.setContentType(
          new ContentType(
              ctm.getContentType(new PartName("/" + resolvedPartUri)) ) );
     
      ((BinaryPart)part).setBinaryData(in);
      log.info("Stored as BinaryData" );
     
View Full Code Here

   * Constructor.  Also creates a new content type manager
   *
   */ 
  public PresentationMLPackage() {
    super();
    setContentType(new ContentType(ContentTypes.PRESENTATIONML_MAIN));    
  }
View Full Code Here

   * @param contentTypeManager
   *            The content type manager to use
   */
  public PresentationMLPackage(ContentTypeManager contentTypeManager) {
    super(contentTypeManager);
    setContentType(new ContentType(ContentTypes.PRESENTATIONML_MAIN));
  }
View Full Code Here

    public void inlineToDocx(WordprocessingMLPackage wordPackage, Text text, Object paramValue, Matcher matcher) {
        try {
            AlternativeFormatInputPart afiPart = new AlternativeFormatInputPart(new PartName("/" + UUID.randomUUID().toString() + ".html"));
            afiPart.setBinaryData(paramValue.toString().getBytes());
            afiPart.setContentType(new ContentType("text/html"));
            Relationship altChunkRel = wordPackage.getMainDocumentPart().addTargetPart(afiPart);
            CTAltChunk ac = Context.getWmlObjectFactory().createCTAltChunk();
            ac.setId(altChunkRel.getId());
            R run = (R) text.getParent();
            run.getContent().add(ac);
View Full Code Here

TOP

Related Classes of org.docx4j.openpackaging.contenttype.ContentType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.