Hi,
Hi Djordje,
Diagram diagram = new Diagram(“C:/temp/SonyUSOnlineCF_Draft_20141218_Spanish.vdx”);
StringBuilder outText = new StringBuilder();
//Find a particular shape and update its text
for (com.aspose.diagram.Shape shape : (Iterable) diagram.getPages().getPage(“1_Intro”).getShapes())
{
String shapeText = shape.getText().getValue().getText();
outText.append(shapeText.replaceAll("\<.*?>",""));
}
System.out.println(outText);
Hi,
Hi,
Hi Djordje,
static String text = “”;
public static void main(String[] args) throws Exception
{
License licDiagram = new License();
licDiagram.setLicense(“C:\Aspose.Total.Java.lic”);
Diagram diagram = new Diagram(“C:/temp/SonyUSOnlineCF_Draft_20141218_Spanish.vdx”);
for (com.aspose.diagram.Shape shape : (Iterable) page.getShapes())
{
GetShapeText(shape);
}
System.out.println(TestCls.text);
}
static void GetShapeText(Shape shape)
{
if (shape.getType() != TypeValue.GROUP)
TestCls.text += (shape.getText().getValue().getText().replaceAll("\<.*?>",""));
else
for(Shape subshape : (Iterable) shape.getShapes())
{
GetShapeText(subshape);
}
}
}
djordje:
one more thing, when I extract withn this algorithm I got output like this: Network, Network is text from diagram and that is ok but this tag I can not see in document, why is he showing?
Hi,
Hi,
Hi Djordje,
Thank you for contacting support. It is because most of the group shapes are protected at Shape Sheet level. Please check this help topic: http://support.microsoft.com/kb/305343?wa=wsignin1.0
However, we have also noticed that the getPage method of Diagram class throws a null pointer error when passing page name as parameter. It works fine in case of page index. We have logged this issue under ticket id DIAGRAMJAVA-50140 in our issue tracking system. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.
Please feel free to reply us in case of any confusion or questions.
Hi Djordje,
Hi,
Hi Djordje,
static String text = “”;
public static void main(String[] args) throws Exception
{
License licDiagram = new License();
licDiagram.setLicense(“C:\Aspose.Total.Java.lic”);
Diagram diagram = new Diagram(“C:/temp/dr_qvs_DeploymentSource1.vsd”);
for (com.aspose.diagram.Shape shape : (Iterable) page.getShapes())
{
GetShapeText(shape);
}
System.out.println(TestCls.text);
}
{
// for image shapes
if (shape.getType() == TypeValue.FOREIGN)
TestCls.text += (shape.getName());
// for group shapes
if (shape.getType() == TypeValue.GROUP)
for(Shape subshape : (Iterable) shape.getShapes())
{
GetShapeText(subshape);
}
}
}
The issues you have found earlier (filed as DIAGRAMJAVA-50140) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
Hi,
Hi Djordje,
Hi,
Hi Djordje,