We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Render rotated text within shapes

Currently we are reading Word documents and extract data, including word-images.


Using the GetShapeRenderer on shapes gives use pretty much what we want of these shapes but when these shapes contain text and are rotated the text it self is shown simply horizontal where as the rest of the shape is rotated 30 degrees. How render this image with also the text rotated?
(note: we are using Aspose.Words 13.7)

Two samples added with left the Aspose output and left the Word-view.

Hi there,

Thanks for your inquiry. I have tested the scenario by using following code snippet and have managed to reproduce the same issue at my side. I have attached the input/output document with this post for your reference. It would be great if you please share your input document here for testing. I will investigate the issue with your documents on my side and provide you more information.

<!–[if gte mso 9]>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>AR-SA</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val=“Cambria Math”/>
<m:brkBin m:val=“before”/>
<m:brkBinSub m:val="–"/>
<m:smallFrac m:val=“off”/>
<m:dispDef/>
<m:lMargin m:val=“0”/>
<m:rMargin m:val=“0”/>
<m:defJc m:val=“centerGroup”/>
<m:wrapIndent m:val=“1440”/>
<m:intLim m:val=“subSup”/>
<m:naryLim m:val=“undOvr”/>
</m:mathPr></w:WordDocument>
<![endif]–><!–[if gte mso 10]>

/* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; mso-para-margin-left:0in; line-height:115%; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;}

<![endif]–>

Document doc = new Document(MyDir + "Test40.docx");

foreach (Shape shape in doc.GetChildNodes(NodeType.Shape, true))

{

shape.GetShapeRenderer().Save(MyDir + "Out.png", new ImageSaveOptions(SaveFormat.Png));

}



I have logged this issue as WORDSNET-9042 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Added my testing document.


(note: i saw a few other differences between Word and the Aspose output; eq: The eyes of the smily filled vs. empty and the arrow with the dashed tail looks different come to mind)

Hi there,

Thanks for sharing the document.

Regarding shape’s rendering issue (arrow tail and smiley face), I have managed to reproduce the same issue at my side by using following code example.


Document doc = new Document(MyDir

  • “in.docx”);

int i = 1;

foreach (DrawingML dml in doc.GetChildNodes(NodeType.DrawingML, true))

{

dml.GetShapeRenderer().Save(MyDir + "Out\\Out_" + i + ".png", new ImageSaveOptions(SaveFormat.Png));

i++;

}


I have logged this issue as WORDSNET-9048 in our issue tracking system. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-9048) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-9042) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.