Package org.docx4j.wml.P

Examples of org.docx4j.wml.P.Hyperlink


    wordMLPackage.getMainDocumentPart().addParagraphOfText("x");
    wordMLPackage.getMainDocumentPart().addParagraphOfText("x");
   
    // Now add an internal hyperlink to it
    Hyperlink h = MainDocumentPart.hyperlinkToBookmark(bookmarkName, "link to bookmark");
    wordMLPackage.getMainDocumentPart().addParagraphOfText("some text").getContent().add(h);
   
    System.out.println( XmlUtils.marshaltoString(p, true)  );
   
    SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
View Full Code Here


   
    WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
    MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
   
    // Create hyperlink
    Hyperlink link = createHyperlink(mdp, "http://slashdot.org");
   
    // Add it to a paragraph
    org.docx4j.wml.P paragraph = Context.getWmlObjectFactory().createP();
    paragraph.getContent().add( link );
    mdp.addObject(paragraph);
View Full Code Here

    wordMLPackage.getMainDocumentPart().addParagraphOfText("x");
    wordMLPackage.getMainDocumentPart().addParagraphOfText("x");

    // Now add an internal hyperlink to it
    Hyperlink h = MainDocumentPart.hyperlinkToBookmark(bookmarkName, "link to bookmark");
    wordMLPackage.getMainDocumentPart().addParagraphOfText("some text").getContent().add(h);

    System.out.println(XmlUtils.marshaltoString(p, true));

    SaveToZipFile saver = new SaveToZipFile(wordMLPackage);
View Full Code Here

TOP

Related Classes of org.docx4j.wml.P.Hyperlink

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.