You need to provide a docx pptx and/or xlsx in which skew has been applied within the Office application to the image. Instructions as to how to do it would also be useful.
If you can't do it in Office, you can't do it in docx4j.
If you can do it in Office, you can probably apply the same setting using docx4j.
As far as I can tell, there is no "skew" option for images in Word or Powerpoint, but you can achieve something similar using its 3D rotation interface. Once you have created an example (in Word say), you can use the Docx4j Helper AddIn for Word, or docx4j webapp, to generate corresponding code. The XML for my example included:
Using xml Syntax Highlighting
<a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
<pic:nvPicPr>
<pic:cNvPr id="1" name=""/>
<pic:cNvPicPr/>
</pic:nvPicPr>
<pic:blipFill>
<a:blip xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" r:embed="rId4"/>
<a:stretch>
<a:fillRect/>
</a:stretch>
</pic:blipFill>
<pic:spPr>
<a:xfrm>
<a:off x="0" y="0"/>
<a:ext cx="5427178" cy="2888660"/>
</a:xfrm>
<a:prstGeom prst="rect">
<a:avLst/>
</a:prstGeom>
<a:scene3d>
<a:camera prst="orthographicFront">
<a:rot lat="20309688" lon="18723851" rev="611854"/>
</a:camera>
<a:lightRig dir="t" rig="threePt"/>
</a:scene3d>
<a:sp3d z="63500"/>
</pic:spPr>
</pic:pic>
</a:graphicData>
Parsed in 0.005 seconds, using
GeSHi 1.0.8.4
Note scene3d and sp3d elements.
For that bit the corresponding code is:
Using java Syntax Highlighting
import org.docx4j.dml.CTScene3D;
import org.docx4j.dml.CTShape3D;
// Create object for scene3D
CTScene3D scene3d
= dmlObjectFactory.
createCTScene3D();
shapeproperties.
setScene3D(scene3d
);
// Create object for camera
CTCamera camera
= dmlObjectFactory.
createCTCamera();
scene3d.
setCamera(camera
);
// Create object for rot
CTSphereCoords spherecoords
= dmlObjectFactory.
createCTSphereCoords();
camera.
setRot(spherecoords
);
spherecoords.
setLat( 20309688
);
spherecoords.
setLon( 18723851
);
spherecoords.
setRev( 611854
);
camera.
setPrst(org.
docx4j.
dml.
STPresetCameraType.
ORTHOGRAPHIC_FRONT);
camera.
setZoom( new Integer(100000
) );
// Create object for lightRig
CTLightRig lightrig
= dmlObjectFactory.
createCTLightRig();
scene3d.
setLightRig(lightrig
);
lightrig.
setRig(org.
docx4j.
dml.
STLightRigType.
THREE_PT);
lightrig.
setDir(org.
docx4j.
dml.
STLightRigDirection.
T);
// Create object for sp3D
CTShape3D shape3d
= dmlObjectFactory.
createCTShape3D();
shapeproperties.
setSp3D(shape3d
);
shape3d.
setZ( new Long(63500
) );
shape3d.
setExtrusionH( new Long(0
) );
shape3d.
setContourW( new Long(0
) );
shape3d.
setPrstMaterial(org.
docx4j.
dml.
STPresetMaterialType.
WARM_MATTE);
Parsed in 0.037 seconds, using
GeSHi 1.0.8.4
There is also skew in VML,
https://docs.microsoft.com/en-us/dotnet ... nxml-2.8.1This element specifies a perspective skew effect on a shape. The skew is applied to vector graphics, not image data on the shape in picture fills or image elements. The on attribute shall be true and a permitted value assigned to the matrix attribute.
but I guess you are working with bit-mapped images?