- Opened up Export.pptx using Aspose.Slides for .NET 14.2.0 and exported to PDF- No issue observed in generated PDF (Export.pptx.pdf).
- Opened up Export.pptx in PowerPoint 2010 and moved connected shapes. This re-adjusted connectors and saved it as Export2.pptx.
- Opened up Export2.pptx using Aspose.Slides for .NET 14.2.0 and exported to PDF- No issue observed in generated PDF (Export2.pptx.pdf).
The issues you have found earlier (filed as SLIDESNET-31745) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
looks like the issue has been solved for .NET. However, I came across the same issue using Aspose.Slides for Java (tried out and found in 17.2, 18.5 and 18.7). Please find a sample ppt attached.
mytest.zip (24.9 KB)
I have observed the presentation file shared by you and request you to please share the used sample code and generated output for reference. Please also first try using Aspose.Slides for Java 18.7 as well on your end.
please find some sample code below.
Presentation pres = new Presentation(); // Get the first slide ISlide sld = pres.getSlides().get_Item(0); // Add AutoShape of ellipse type IShape shp = sld.getShapes().addAutoShape(ShapeType.Rectangle, 50, 100, 100, 50); IShape shp1 = sld.getShapes().addAutoShape(ShapeType.Rectangle, 50, 200, 100, 50); IShapeCollection shapes = pres.getSlides().get_Item(0).getShapes(); IConnector connector = shapes.addConnector(ShapeType.Line, 100, 100, 100, 100); connector.getLineFormat().setEndArrowheadStyle(LineArrowheadStyle.Triangle); connector.getLineFormat().getFillFormat().setFillType(FillType.Solid); connector.getLineFormat().getFillFormat().getSolidFillColor().setColor(Color.BLACK); connector.setStartShapeConnectedTo(shapes.get_Item(0)); /*int tempx=(int) shapes.get_Item((int) istop).getX()+1; shapes.get_Item((int) istop).setX(tempx);*/ connector.setEndShapeConnectedTo(shapes.get_Item(1)); connector.setStartShapeConnectionSiteIndex(2); connector.setEndShapeConnectionSiteIndex(0); // Write the PPTX file to disk pres.save("C:/Temp/" + "mytest.pptx", SaveFormat.Pptx);
The attached file shows the output.mytest.zip (21.5 KB)
The end of the connector does not attach exactly at position 0 of the second shape. If you move the shape manually the connector is re drawn and attaches in the correct place.
I have worked with source code shared by you using Aspose.Slides for Java 18.7 and have been able to observe issue. An issue with ID SLIDESJAVA-37311 has been added in our issue tracking system to further investigate and help you out in this matter. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.
We are currently using Aspose.Slides .Net version 184.108.40.206 and are also seeing an issue where vertical connectors are not quite being draw accurately. We have two identical shapes vertically aligned. A connector is drawn between the bottom of the top shape and the top of the bottom shape. When you open the pptx the line is not completely vertical. When you grab either end of the connector with the pointer it “snaps” to the connector poin on the shape.
I thought this had been resolved in the .Net version. An I missing something?
I have observed the issue shared by you and request you to please share the source presentation, used sample code, generated output along with depiction of issue in the form of image. We will be able to investigate the issue further on our end on provision of requested information. Before this, I also request you to please try using latest Aspose.Slides for .NET 18.8 on your end.
I have attached a zip file containing an example project and a pdf output the of slide that is generated.
The project generates a simple slide with two shapes and a connector from the bottom site of the top shape to the top site of the bottom shape. The connector is drawn slanting to the right. We would expect this to be vertical.
As a test we opened the pptx in PowerPoint and duplicated the slide. On the second slide we double clicked the end point of the connector which straightens the connector. We then saved the slide again. This pptx has been included in the zip and help to highlight the correction.
To investigate further I renamed the pptx to zip to allow me to unpack the OpenXml. I used a tool to compare the Xml for the original Slide 1 and Corrected slide 2 to see the effect the manual correction to the connector makes to the underlying Xml.
The Xml for the connector as generated by Aspose.Slides is
<p:cxnSp> <p:nvCxnSpPr> <p:cNvPr id="4" name="New connector"/> <p:cNvCxnSpPr> <a:stCxn id="2" idx="2"/> <a:endCxn id="3" idx="0"/> </p:cNvCxnSpPr> <p:nvPr/> </p:nvCxnSpPr> <p:spPr> <a:xfrm> <a:off x="889000" y="889000"/> <a:ext cx="12700" cy="127000"/> </a:xfrm> <a:prstGeom prst="straightConnector1"> <a:avLst/> </a:prstGeom> <a:ln w="12700"/> </p:spPr> <p:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="0"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </p:style> </p:cxnSp>
The Xml for the connector is the corrected slide is
<p:cNvPr id=“4” name=“New connector”/>
<a:stCxn id=“2” idx=“2”/>
<a:endCxn id=“3” idx=“0”/>
<a:off x=“889000” y=“889000”/>
<a:ext cx=“0” cy=“127000”/>
There are a couple of differences. I think the added to the Locks element is not important however on the corrected slide the cx property of the a:ext element was been changed to 0.
Therefore for whatever reason it appears that the value of 12700 that Aspose is writing out is the cause of the slanting line.
Can you investigate and get back to me.
I have observed the information shared by you. Actually, this is not an issue but requires imparting clarification. You have to give the connection sites on the shapes where you want to add connectors. The connection sites are in center of any shape side line. So, when you give two points they get connected and it is not necessarily a straight line. You can verify this by adding two shapes of same size but only change Y position. Then you add connector for that and you will find the vertical. I hope the shared elaboration will be helpful.
In the example the two shapes being connected are of the same size and it is only the Y position that has been changed. Therefore based on your explanation the line should be vertical, but as you can see from our example the line is not vertical. This is the issue.
Thank you for the elaboration. I have been able to reproduce the issue on my end. An issue with ID SLIDESNET-40544 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.
I just wanted to catch up on ID SLIDESJAVA-37311. Are there any news regarding the issue?
I have verified the issue status from our issue tracking system and regret to share that issue is still unresolved owing to internal blocking issue. We request for your patience till the time the issue gets resolved.
Can you share a timeline of when this will be fixed?