p:graphicFrame org.pptx4j.pml.ObjectFactory createCTGraphicalObjectFrame()
a:graphic org.docx4j.dml.ObjectFactory createGraphic()
a:graphicData org.docx4j.dml.ObjectFactory createGraphicData()
a:tbl org.docx4j.dml.ObjectFactory createTbl(CTTable value) and createCTTable()
ObjectFactory objectFactory=new ObjectFactory();
org.pptx4j.pml.ObjectFactory graphicObjectFactory=new org.pptx4j.pml.ObjectFactory();
CTGraphicalObjectFrame graphicFrame=graphicObjectFactory.createCTGraphicalObjectFrame();
Graphic graphic=objectFactory.createGraphic();
GraphicData graphicData=objectFactory.createGraphicData();
CTTable ctTable=objectFactory.createCTTable();
JAXBElement<CTTable> tbl=objectFactory.createTbl(ctTable);
CTTableRow tableRow=objectFactory.createCTTableRow();
CTTableCell tableCell=objectFactory.createCTTableCell();
slidePart.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add(graphicFrame);
graphicFrame.setGraphic(graphic);
graphic.setGraphicData(graphicData);
graphicData.setUri("http://schemas.openxmlformats.org/drawingml/2006/table");
- <p:graphicFrame>
- <p:nvGraphicFramePr>
<p:cNvPr id="4114" name="Group 18" />
- <p:cNvGraphicFramePr>
<a:graphicFrameLocks noGrp="1" />
</p:cNvGraphicFramePr>
<p:nvPr />
</p:nvGraphicFramePr>
- <p:xfrm>
<a:off x="1524000" y="1981200" />
<a:ext cx="4038600" cy="762000" />
</p:xfrm>
- <a:graphic>
- <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table">
- <a:tbl>
<a:tblPr />
- <a:tblGrid>
<a:gridCol w="4038600" />
</a:tblGrid>
- <a:tr h="762000">
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:pPr marL="0" marR="0" lvl="0" indent="0" algn="l" defTabSz="914400" rtl="0" eaLnBrk="0" fontAlgn="base" latinLnBrk="0" hangingPunct="0">
- <a:lnSpc>
<a:spcPct val="100000" />
</a:lnSpc>
- <a:spcBef>
<a:spcPct val="20000" />
</a:spcBef>
- <a:spcAft>
<a:spcPct val="0" />
</a:spcAft>
<a:buClrTx />
<a:buSzTx />
<a:buFontTx />
<a:buNone />
<a:tabLst />
</a:pPr>
- <a:endParaRPr kumimoji="0" lang="en-US" sz="2800" b="0" i="0" u="none" strike="noStrike" cap="none" normalizeH="0" baseline="0" smtClean="0">
- <a:ln>
<a:noFill />
</a:ln>
- <a:solidFill>
<a:schemeClr val="tx1" />
</a:solidFill>
<a:effectLst />
<a:latin typeface="Arial" charset="0" />
</a:endParaRPr>
</a:p>
</a:txBody>
- <a:tcPr horzOverflow="overflow">
- <a:lnL w="12700" cap="flat" cmpd="sng" algn="ctr">
- <a:solidFill>
<a:schemeClr val="tx1" />
</a:solidFill>
<a:prstDash val="solid" />
<a:round />
<a:headEnd type="none" w="med" len="med" />
<a:tailEnd type="none" w="med" len="med" />
</a:lnL>
- <a:lnR w="12700" cap="flat" cmpd="sng" algn="ctr">
- <a:solidFill>
<a:schemeClr val="tx1" />
</a:solidFill>
<a:prstDash val="solid" />
<a:round />
<a:headEnd type="none" w="med" len="med" />
<a:tailEnd type="none" w="med" len="med" />
</a:lnR>
- <a:lnT w="12700" cap="flat" cmpd="sng" algn="ctr">
- <a:solidFill>
<a:schemeClr val="tx1" />
</a:solidFill>
<a:prstDash val="solid" />
<a:round />
<a:headEnd type="none" w="med" len="med" />
<a:tailEnd type="none" w="med" len="med" />
</a:lnT>
- <a:lnB w="12700" cap="flat" cmpd="sng" algn="ctr">
- <a:solidFill>
<a:schemeClr val="tx1" />
</a:solidFill>
<a:prstDash val="solid" />
<a:round />
<a:headEnd type="none" w="med" len="med" />
<a:tailEnd type="none" w="med" len="med" />
</a:lnB>
- <a:lnTlToBr>
<a:noFill />
</a:lnTlToBr>
- <a:lnBlToTr>
<a:noFill />
</a:lnBlToTr>
<a:noFill />
</a:tcPr>
</a:tc>
</a:tr>
</a:tbl>
</a:graphicData>
ObjectFactory objectFactory=new ObjectFactory();
org.pptx4j.pml.ObjectFactory graphicObjectFactory=new org.pptx4j.pml.ObjectFactory();
CTGraphicalObjectFrame graphicFrame=graphicObjectFactory.createCTGraphicalObjectFrame();
Graphic graphic=objectFactory.createGraphic();
GraphicData graphicData=objectFactory.createGraphicData();
CTTable ctTable=objectFactory.createCTTable();
JAXBElement<CTTable> tbl=objectFactory.createTbl(ctTable);
CTTableRow tableRow=objectFactory.createCTTableRow();
CTTableCell tableCell=objectFactory.createCTTableCell();
CTTableProperties ctTablePro=objectFactory.createCTTableProperties();
CTTableGrid ctTableGrid=objectFactory.createCTTableGrid();
CTTableCol ctTableCol=objectFactory.createCTTableCol();
ctTableGrid.getGridCol().add(ctTableCol);
slidePart.getJaxbElement().getCSld().getSpTree().getSpOrGrpSpOrGraphicFrame().add(graphicFrame);
graphicFrame.setGraphic(graphic);
graphic.setGraphicData(graphicData);
graphicData.setUri("http://schemas.openxmlformats.org/drawingml/2006/table");
graphicData.getAny().add(tbl);
ctTable.getTr().add(tableRow);
ctTable.setTblPr(ctTablePro);
ctTable.setTblGrid(ctTableGrid);
tableRow.getTc().add(tableCell);
presentationMLPackage.save(new java.io.File(outputfilepath));
System.out.println("\n\n done .. \n\n");
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <p:sld xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
- <p:cSld>
- <p:spTree>
- <p:nvGrpSpPr>
<p:cNvPr name="" id="1" />
<p:cNvGrpSpPr />
<p:nvPr />
</p:nvGrpSpPr>
- <p:grpSpPr>
- <a:xfrm>
<a:off y="0" x="0" />
<a:ext cy="0" cx="0" />
<a:chOff y="0" x="0" />
<a:chExt cy="0" cx="0" />
</a:xfrm>
</p:grpSpPr>
- <p:graphicFrame>
- <a:graphic>
- <a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table">
- <a:tbl>
<a:tblPr />
- <a:tblGrid>
<a:gridCol w="0" />
</a:tblGrid>
- <a:tr h="0">
<a:tc />
</a:tr>
</a:tbl>
</a:graphicData>
</a:graphic>
</p:graphicFrame>
</p:spTree>
</p:cSld>
</p:sld>
CTGraphicalObjectFrame graphicFrame2=(CTGraphicalObjectFrame) XmlUtils.unmarshalString(addGraphicFrame, Context.jcPML,CTGraphicalObjectFrame.class);
private static String addGraphicFrame="<p:graphicFrame><p:nvGraphicFramePr><p:cNvPr id=\"3083\" name=\"Group 11\"/><p:cNvGraphicFramePr><a:graphicFrameLocks noGrp=\"1\"/></p:cNvGraphicFramePr><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x=\"1524000\" y=\"1397000\"/><a:ext cx=\"6096000\" cy=\"4064000\"/></p:xfrm><a:graphic><a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/table\"><a:tbl><a:tblPr/><a:tblGrid><a:gridCol w=\"6096000\"/></a:tblGrid><a:tr h=\"2032000\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:pPr marL=\"0\" marR=\"0\" lvl=\"0\" indent=\"0\" algn=\"l\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"0\" fontAlgn=\"base\" latinLnBrk=\"0\" hangingPunct=\"0\"><a:lnSpc><a:spcPct val=\"100000\"/></a:lnSpc><a:spcBef><a:spcPct val=\"20000\"/></a:spcBef><a:spcAft><a:spcPct val=\"0\"/></a:spcAft><a:buClrTx/><a:buSzTx/><a:buFontTx/><a:buNone/><a:tabLst/></a:pPr><a:endParaRPr kumimoji=\"0\" lang=\"en-US\" sz=\"2800\" b=\"0\" i=\"0\" u=\"none\" strike=\"noStrike\" cap=\"none\" normalizeH=\"0\" baseline=\"0\" smtClean=\"0\"><a:ln><a:noFill/></a:ln><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:effectLst/><a:latin typeface=\"Arial\" charset=\"0\"/></a:endParaRPr></a:p></a:txBody><a:tcPr horzOverflow=\"overflow\"><a:lnL w=\"28575\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnL><a:lnR w=\"28575\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnR><a:lnT w=\"28575\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnT><a:lnB w=\"12700\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnB><a:lnTlToBr><a:noFill/></a:lnTlToBr><a:lnBlToTr><a:noFill/></a:lnBlToTr><a:noFill/></a:tcPr></a:tc></a:tr><a:tr h=\"2032000\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:pPr marL=\"0\" marR=\"0\" lvl=\"0\" indent=\"0\" algn=\"l\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"0\" fontAlgn=\"base\" latinLnBrk=\"0\" hangingPunct=\"0\"><a:lnSpc><a:spcPct val=\"100000\"/></a:lnSpc><a:spcBef><a:spcPct val=\"20000\"/></a:spcBef><a:spcAft><a:spcPct val=\"0\"/></a:spcAft><a:buClrTx/><a:buSzTx/><a:buFontTx/><a:buNone/><a:tabLst/></a:pPr><a:endParaRPr kumimoji=\"0\" lang=\"en-US\" sz=\"2800\" b=\"0\" i=\"0\" u=\"none\" strike=\"noStrike\" cap=\"none\" normalizeH=\"0\" baseline=\"0\" smtClean=\"0\"><a:ln><a:noFill/></a:ln><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:effectLst/><a:latin typeface=\"Arial\" charset=\"0\"/></a:endParaRPr></a:p></a:txBody><a:tcPr horzOverflow=\"overflow\"><a:lnL w=\"28575\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnL><a:lnR w=\"28575\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnR><a:lnT w=\"12700\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnT><a:lnB w=\"28575\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"tx1\"/></a:solidFill><a:prstDash val=\"solid\"/><a:round/><a:headEnd type=\"none\" w=\"med\" len=\"med\"/><a:tailEnd type=\"none\" w=\"med\" len=\"med\"/></a:lnB><a:lnTlToBr><a:noFill/></a:lnTlToBr><a:lnBlToTr><a:noFill/></a:lnBlToTr><a:noFill/></a:tcPr></a:tc></a:tr></a:tbl></a:graphicData></a:graphic></p:graphicFrame>";
Exception in thread "main" javax.xml.bind.UnmarshalException
- with linked exception:
[org.xml.sax.SAXParseException: The prefix "p" for element "p:graphicFrame" is not bound.]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(Unknown Source)
MainPresentationPart pp = (MainPresentationPart)presentationMLPackage.getParts().getParts().get(
new PartName("/ppt/presentation.xml"));
SlidePart slidePart = presentationMLPackage.createSlidePart(pp, layoutPart,
new PartName("/ppt/slides/slide1.xml"));
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main"
String addGraphicFrame="<p:graphicFrame [NAMESPACES GO HERE]....
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:sld xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
<p:cSld>
<p:spTree>
<p:nvGrpSpPr>
<p:cNvPr name="" id="1"/>
<p:cNvGrpSpPr/>
<p:nvPr/>
</p:nvGrpSpPr>
<p:grpSpPr>
<a:xfrm>
<a:off y="0" x="0"/>
<a:ext cy="0" cx="0"/>
<a:chOff y="0" x="0"/>
<a:chExt cy="0" cx="0"/>
</a:xfrm>
</p:grpSpPr>
<p:graphicFrame>
<p:nvGraphicFramePr>
<p:cNvPr name="1" id="0"/>
<p:cNvGraphicFramePr>
<a:graphicFrameLocks noGrp="true"/>
</p:cNvGraphicFramePr>
<p:nvPr/>
</p:nvGraphicFramePr>
<p:xfrm>
<a:off y="0" x="0"/>
<a:ext cy="0" cx="0"/>
</p:xfrm>
<a:graphic>
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/table">
<a:tbl>
<a:tblGrid>
<a:gridCol w="300000"/>
<a:gridCol w="300000"/>
</a:tblGrid>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
<a:tr h="0">
<a:tc/>
<a:tc/>
</a:tr>
</a:tbl>
</a:graphicData>
</a:graphic>
</p:graphicFrame>
</p:spTree>
</p:cSld>
</p:sld>
protected static Logger log = Logger.getLogger(pptHelloWorld.class);
@SuppressWarnings( { "static-access", "unchecked" })
public static void main(String[] args) throws Exception {
String outputfilepath = System.getProperty("user.dir")
+ "/pptx-out.pptx";
PresentationMLPackage presentationMLPackage = PresentationMLPackage
.createPackage();
// Need references to these parts to create a slide
// Please note that these parts *already exist* - they are
// created by createPackage() above. See that method
// for instruction on how to create and add a part.
MainPresentationPart pp = (MainPresentationPart) presentationMLPackage
.getParts().getParts().get(
new PartName("/ppt/presentation.xml"));
SlideLayoutPart layoutPart = (SlideLayoutPart) presentationMLPackage
.getParts().getParts().get(
new PartName("/ppt/slideLayouts/slideLayout1.xml"));
// OK, now we can create a slide
SlidePart slidePart = presentationMLPackage.createSlidePart(pp,
layoutPart, new PartName("/ppt/slides/slide1.xml"));
SlidePart slidePart2 = presentationMLPackage.createSlidePart(pp,
layoutPart, new PartName("/ppt/slides/slide2.xml"));
//instatiation the factory for later object creation.
ObjectFactory objectFactory = new ObjectFactory();
org.pptx4j.pml.ObjectFactory graphicObjectFactory = new org.pptx4j.pml.ObjectFactory();
//Node Creation
CTGraphicalObjectFrame graphicFrame = graphicObjectFactory
.createCTGraphicalObjectFrame();
org.pptx4j.pml.CTGraphicalObjectFrameNonVisual nvGraphicFramePr=graphicObjectFactory.createCTGraphicalObjectFrameNonVisual();
org.docx4j.dml.CTNonVisualDrawingProps cNvPr=objectFactory.createCTNonVisualDrawingProps();
org.docx4j.dml.CTNonVisualGraphicFrameProperties cNvGraphicFramePr=objectFactory.createCTNonVisualGraphicFrameProperties();
org.docx4j.dml.CTGraphicalObjectFrameLocking graphicFrameLocks=new org.docx4j.dml.CTGraphicalObjectFrameLocking();
org.docx4j.dml.CTTransform2D xfrm=objectFactory.createCTTransform2D();
Graphic graphic = objectFactory.createGraphic();
GraphicData graphicData = objectFactory.createGraphicData();
CTTable ctTable = objectFactory.createCTTable();
JAXBElement<CTTable> tbl = objectFactory.createTbl(ctTable);
CTTableGrid ctTableGrid = objectFactory.createCTTableGrid();
CTTableCol gridCol = objectFactory.createCTTableCol();
CTTableRow ctTableRow = objectFactory.createCTTableRow();
CTTableCell ctTableCell = objectFactory.createCTTableCell();
//Build the parent-child relationship of this slides.xml
graphicFrame.setNvGraphicFramePr(nvGraphicFramePr);
nvGraphicFramePr.setCNvPr(cNvPr);
cNvPr.setName("1");
nvGraphicFramePr.setCNvGraphicFramePr(cNvGraphicFramePr);
cNvGraphicFramePr.setGraphicFrameLocks(graphicFrameLocks);
graphicFrameLocks.setNoGrp(true);
nvGraphicFramePr.setNvPr(graphicObjectFactory.createNvPr());
graphicFrame.setXfrm(xfrm);
xfrm.setExt(objectFactory.createCTPositiveSize2D());
xfrm.setOff(objectFactory.createCTPoint2D());
graphicFrame.setGraphic(graphic);
graphic.setGraphicData(graphicData);
graphicData.setUri("http://schemas.openxmlformats.org/drawingml/2006/table");
graphicData.getAny().add(tbl);
ctTable.setTblGrid(ctTableGrid);
ctTableGrid.getGridCol().add(gridCol);
ctTableGrid.getGridCol().add(gridCol);
gridCol.setW(300000);
ctTableRow.getTc().add(ctTableCell);
ctTableRow.getTc().add(ctTableCell);
for(int i=0;i<20;i++){ctTable.getTr().add(ctTableRow);}
Exception in thread "main" javax.xml.bind.UnmarshalException: unexpected element (uri:"http://schemas.openxmlformats.org/presentationml/2006/main", local:"graphicFrame"). Expected elements are <{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}anchor>,<{http://schemas.openxmlformats.org/drawingml/2006/main}blip>,<{http://schemas.openxmlformats.org/drawingml/2006/chart}chart>,<{http://schemas.openxmlformats.org/drawingml/2006/chart}chartSpace>,<{http://schemas.openxmlformats.org/presentationml/2006/main}cmAuthorLst>,<{http://schemas.openxmlformats.org/presentationml/2006/main}cmLst>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}colorsDef>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}colorsDefHdr>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}colorsDefHdrLst>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}dataModel>,<{http://schemas.openxmlformats.org/drawingml/2006/main}graphic>,<{http://schemas.openxmlformats.org/presentationml/2006/main}handoutMaster>,<{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}inline>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}layoutDef>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}layoutDefHdr>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}layoutDefHdrLst>,<{http://schemas.openxmlformats.org/drawingml/2006/compatibility}legacyDrawing>,<{http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas}lockedCanvas>,<{http://schemas.openxmlformats.org/presentationml/2006/main}notes>,<{http://schemas.openxmlformats.org/presentationml/2006/main}notesMaster>,<{http://schemas.openxmlformats.org/presentationml/2006/main}oleObj>,<{http://schemas.openxmlformats.org/drawingml/2006/picture}pic>,<{http://schemas.openxmlformats.org/presentationml/2006/main}presentation>,<{http://schemas.openxmlformats.org/presentationml/2006/main}presentationPr>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}relIds>,<{http://schemas.openxmlformats.org/presentationml/2006/main}sld>,<{http://schemas.openxmlformats.org/presentationml/2006/main}sldLayout>,<{http://schemas.openxmlformats.org/presentationml/2006/main}sldMaster>,<{http://schemas.openxmlformats.org/presentationml/2006/main}sldSyncPr>,<{http://schemas.openxmlformats.org/presentationml/2006/main}sp>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}styleDef>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}styleDefHdr>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}styleDefHdrLst>,<{http://schemas.openxmlformats.org/drawingml/2006/diagram}t>,<{http://schemas.openxmlformats.org/presentationml/2006/main}tagLst>,<{http://schemas.openxmlformats.org/drawingml/2006/main}tbl>,<{http://schemas.openxmlformats.org/drawingml/2006/main}tblStyleLst>,<{http://schemas.openxmlformats.org/drawingml/2006/main}theme>,<{http://schemas.openxmlformats.org/drawingml/2006/main}themeManager>,<{http://schemas.openxmlformats.org/drawingml/2006/main}themeOverride>,<{http://schemas.openxmlformats.org/drawingml/2006/chart}userShapes>,<{http://schemas.openxmlformats.org/presentationml/2006/main}viewPr>,<{http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing}wsDr>
MainPresentationPart pp = (MainPresentationPart) presentationMLPackage
.getParts().getParts()
.get(new PartName("/ppt/presentation.xml"));
SlideLayoutPart layoutPart = (SlideLayoutPart) presentationMLPackage
.getParts().getParts()
.get(new PartName("/ppt/slideLayouts/slideLayout1.xml"));
// Create slide page titre
SlidePart slidePart = presentationMLPackage.createSlidePart(pp,
layoutPart, new PartName("/ppt/slides/slide4.xml"));
...
...
String caseA = "caseA";
String caseB = "caseB";
String tableau;
String part1 = "", part2 = "", part3 = "";
String ligne = "";
part1 = "<p:graphicFrame xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\"><p:nvGraphicFramePr><p:cNvPr id=\"11\" \"ame=\"Tableau 10\" /> <p:cNvGraphicFramePr><a:graphicFrameLocks noGrp=\"1\"/></p:cNvGraphicFramePr><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x=\"762000\" y=\"1524000\"/><a:ext cx=\"7772400\" cy=\"4267200\"/></p:xfrm><a:graphic><a:graphicData ><a:tbl><a:tblPr firstRow=\"1\" bandRow=\"1\"><a:tableStyleId>{5940675A-B579-460E-94D1-54222C63F5DA}</a:tableStyleId></a:tblPr><a:tblGrid><a:gridCol w=\"1676400\"/><a:gridCol w=\"6096000\"/></a:tblGrid>";
ligne = "<a:tr h=\"640080\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>"
+ caseA
+ "</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\" anchorCtr=\"1\"><a:solidFill><a:schemeClr val=\"bg1\"><a:lumMod val=\"85000\"/></a:schemeClr></a:solidFill></a:tcPr></a:tc><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>"
+ caseB
+ "</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\" anchorCtr=\"1\"><a:solidFill><a:schemeClr val=\"bg1\"><a:lumMod val=\"85000\"/></a:schemeClr></a:solidFill></a:tcPr></a:tc></a:tr>";
part3 = "</a:tbl></a:graphicData></a:graphic></p:graphicFrame>";
tableau = "" + part1 + ligne + ligne + part3;
tableau = "<p:graphicFrame xmlns:uri=\"http://schemas.openxmlformats.org/drawingml/2006/table\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:p=\"http://schemas.openxmlformats.org/presentationml/2006/main\"><p:nvGraphicFramePr><p:cNvPr id=\"11\" name=\"Tableau 10\"/><p:cNvGraphicFramePr><a:graphicFrameLocks noGrp=\"1\"/></p:cNvGraphicFramePr><p:nvPr/></p:nvGraphicFramePr><p:xfrm><a:off x=\"762000\" y=\"1524000\"/><a:ext cx=\"7772400\" cy=\"4267200\"/></p:xfrm><a:graphic><a:graphicData ><a:tbl><a:tblPr firstRow=\"1\" bandRow=\"1\"><a:tableStyleId>{5940675A-B579-460E-94D1-54222C63F5DA}</a:tableStyleId></a:tblPr><a:tblGrid><a:gridCol w=\"1676400\"/><a:gridCol w=\"6096000\"/></a:tblGrid><a:tr h=\"640080\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>Étage</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\" anchorCtr=\"1\"><a:solidFill><a:schemeClr val=\"bg1\"><a:lumMod val=\"85000\"/></a:schemeClr></a:solidFill></a:tcPr></a:tc><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>Sommaire</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\" anchorCtr=\"1\"><a:solidFill><a:schemeClr val=\"bg1\"><a:lumMod val=\"85000\"/></a:schemeClr></a:solidFill></a:tcPr></a:tc></a:tr><a:tr h=\"853440\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>C</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:pPr algn=\"ctr\"/><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>Bonne couverture</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc></a:tr><a:tr h=\"853440\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>C1</a:t></a:r></a:p><a:p><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:pPr algn=\"ctr\"/><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>Bonne couverture</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc></a:tr><a:tr h=\"960120\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>P1</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:pPr algn=\"ctr\"/><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>Bonne couverture</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc></a:tr><a:tr h=\"960120\"><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>P2</a:t></a:r><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc><a:tc><a:txBody><a:bodyPr/><a:lstStyle/><a:p><a:pPr marL=\"0\" marR=\"0\" indent=\"0\" algn=\"ctr\" defTabSz=\"914400\" rtl=\"0\" eaLnBrk=\"1\" fontAlgn=\"auto\" latinLnBrk=\"0\" hangingPunct=\"1\"><a:lnSpc><a:spcPct val=\"100000\"/></a:lnSpc><a:spcBef><a:spcPts val=\"0\"/></a:spcBef><a:spcAft><a:spcPts val=\"0\"/></a:spcAft><a:buClrTx/><a:buSzTx/><a:buFontTx/><a:buNone/><a:tabLst/><a:defRPr/></a:pPr><a:r><a:rPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\" smtClean=\"0\"/><a:t>Bonne couverture</a:t></a:r></a:p><a:p><a:pPr algn=\"ctr\"/><a:endParaRPr lang=\"fr-CA\" sz=\"1400\" dirty=\"0\"/></a:p></a:txBody><a:tcPr anchor=\"ctr\"/></a:tc></a:tr></a:tbl></a:graphicData></a:graphic></p:graphicFrame>";
CTGraphicalObjectFrame graphicFrame2=(CTGraphicalObjectFrame) XmlUtils.unmarshalString(tableau, Context.jcPML,CTGraphicalObjectFrame.class);
Shape sample = ((Shape) XmlUtils
.unmarshalString(tableau, Context.jcPML));
//slidePart.getJaxbElement().getCSld().getSpTree().se
slidePart.getJaxbElement().getCSld().getSpTree()
.getSpOrGrpSpOrGraphicFrame().add(sample);
Shape sample = ((Shape) XmlUtils.unmarshalString(tableau, Context.jcPML));
<p:sld xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:c="http://schemas.openxmlformats.org/drawingml/2006/chart" xmlns:ns5="http://schemas.openxmlformats.org/drawingml/2006/chartDrawing" xmlns:dgm="http://schemas.openxmlformats.org/drawingml/2006/diagram" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:ns9="http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing" xmlns:ns10="http://schemas.openxmlformats.org/drawingml/2006/compatibility" xmlns:ns11="http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas">
- <p:cSld>
- <p:spTree>
- <p:nvGrpSpPr>
<p:cNvPr name="" id="1" />
<p:cNvGrpSpPr />
<p:nvPr />
</p:nvGrpSpPr>
- <p:grpSpPr>
- <a:xfrm>
<a:off y="0" x="0" />
<a:ext cy="0" cx="0" />
<a:chOff y="0" x="0" />
<a:chExt cy="0" cx="0" />
</a:xfrm>
</p:grpSpPr>
- <p:graphicFrame xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns9:CT_GraphicalObjectFrame">
- <a:graphic>
- <a:graphicData>
- <a:tbl>
- <a:tblPr bandRow="true" firstRow="true">
<a:tableStyleId>{5940675A-B579-460E-94D1-54222C63F5DA}</a:tableStyleId>
</a:tblPr>
- <a:tblGrid>
<a:gridCol w="1676400" />
<a:gridCol w="6096000" />
</a:tblGrid>
- <a:tr h="640080">
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>Étage</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
- <a:tcPr anchorCtr="true" anchor="ctr">
- <a:solidFill>
- <a:schemeClr val="bg1">
<a:lumMod val="85000" />
</a:schemeClr>
</a:solidFill>
</a:tcPr>
</a:tc>
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>Sommaire</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
- <a:tcPr anchorCtr="true" anchor="ctr">
- <a:solidFill>
- <a:schemeClr val="bg1">
<a:lumMod val="85000" />
</a:schemeClr>
</a:solidFill>
</a:tcPr>
</a:tc>
</a:tr>
- <a:tr h="853440">
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>C</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
<a:pPr algn="ctr" />
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>Bonne couverture</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
</a:tr>
- <a:tr h="853440">
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>C1</a:t>
</a:r>
</a:p>
- <a:p>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
<a:pPr algn="ctr" />
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>Bonne couverture</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
</a:tr>
- <a:tr h="960120">
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>P1</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
<a:pPr algn="ctr" />
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>Bonne couverture</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
</a:tr>
- <a:tr h="960120">
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>P2</a:t>
</a:r>
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
- <a:tc>
- <a:txBody>
<a:bodyPr />
<a:lstStyle />
- <a:p>
- <a:pPr hangingPunct="true" latinLnBrk="false" fontAlgn="auto" eaLnBrk="true" rtl="false" defTabSz="914400" algn="ctr" indent="0" marR="0" marL="0">
- <a:lnSpc>
<a:spcPct val="100000" />
</a:lnSpc>
- <a:spcBef>
<a:spcPts val="0" />
</a:spcBef>
- <a:spcAft>
<a:spcPts val="0" />
</a:spcAft>
<a:buClrTx />
<a:buSzTx />
<a:buFontTx />
<a:buNone />
<a:tabLst />
<a:defRPr />
</a:pPr>
- <a:r>
<a:rPr smtClean="false" dirty="false" sz="1400" lang="fr-CA" />
<a:t>Bonne couverture</a:t>
</a:r>
</a:p>
- <a:p>
<a:pPr algn="ctr" />
<a:endParaRPr dirty="false" sz="1400" lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr anchor="ctr" />
</a:tc>
</a:tr>
</a:tbl>
</a:graphicData>
</a:graphic>
</p:graphicFrame>
</p:spTree>
</p:cSld>
</p:sld>
<p:graphicFrame xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:nvGraphicFramePr>
<p:cNvPr id="4" name="Tableau 3" />
<p:cNvGraphicFramePr>
<a:graphicFrameLocks noGrp="1" />
</p:cNvGraphicFramePr>
<p:nvPr />
</p:nvGraphicFramePr>
<p:xfrm>
<a:off x="1524000" y="1397000" />
<a:ext cx="959972" cy="741680" />
</p:xfrm>
<a:graphic>
<a:graphicData
uri="http://schemas.openxmlformats.org/drawingml/2006/table">
<a:tbl>
<a:tblPr>
<a:tableStyleId>{073A0DAA-6AF3-43AB-8588-CEC1D06C72B9}
</a:tableStyleId>
</a:tblPr>
<a:tblGrid>
<a:gridCol w="479986" />
<a:gridCol w="479986" />
</a:tblGrid>
<a:tr h="370840">
<a:tc>
<a:txBody>
<a:bodyPr />
<a:lstStyle />
<a:p>
<a:endParaRPr lang="fr-CA" dirty="0" />
</a:p>
</a:txBody>
<a:tcPr />
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr />
<a:lstStyle />
<a:p>
<a:endParaRPr lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr />
</a:tc>
</a:tr>
<a:tr h="370840">
<a:tc>
<a:txBody>
<a:bodyPr />
<a:lstStyle />
<a:p>
<a:endParaRPr lang="fr-CA" />
</a:p>
</a:txBody>
<a:tcPr />
</a:tc>
<a:tc>
<a:txBody>
<a:bodyPr />
<a:lstStyle />
<a:p>
<a:endParaRPr lang="fr-CA" dirty="0" />
</a:p>
</a:txBody>
<a:tcPr />
</a:tc>
</a:tr>
</a:tbl>
</a:graphicData>
</a:graphic>
</p:graphicFrame>
Users browsing this forum: No registered users and 1 guest