Below is the code through which I’m able to replicate the issue:
Presentation pres = new Presentation();
// Access the presentation slide
ISlide slide = pres.getSlides().get_Item(0);
// Add Smart Art IShape
ISmartArt smart = slide.getShapes().addSmartArt(0, 0, 400, 400, SmartArtLayoutType.OrganizationChart);
ISmartArtNode parentNode = smart.getAllNodes().get_Item(0);
parentNode.getTextFrame().setText("H S Bhartia\nCCMD");
IPortionFormat pf = parentNode.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0)
.getPortionFormat();
pf.getFillFormat().setFillType(FillType.Solid);
pf.getFillFormat().getSolidFillColor().setColor(Color.black);
while (parentNode.getChildNodes().size() > 0) {
parentNode.getChildNodes().removeNode(0);
}
SmartArtNode chNode0_1 = (SmartArtNode) ((SmartArtNodeCollection) parentNode.getChildNodes())
.addNodeByPosition(0);
chNode0_1.getTextFrame().setText("Raju Sunil Mistry\nChief Human Resources Officer");
pf = chNode0_1.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat();
pf.getFillFormat().setFillType(FillType.Solid);
pf.getFillFormat().getSolidFillColor().setColor(Color.black);
SmartArtNode chNode1 = (SmartArtNode) ((SmartArtNodeCollection) chNode0_1.getChildNodes()).addNodeByPosition(0);
chNode1.getTextFrame().setText("Shivshant Kumar\nGeneral Manager - HRIS");
pf = chNode1.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getPortionFormat();
pf.getFillFormat().setFillType(FillType.Solid);
pf.getFillFormat().getSolidFillColor().setColor(Color.black);
ISmartArtShapeCollection shapes = chNode0_1.getShapes();
for (int i = 0; i < shapes.size(); i++) {
ISmartArtShape sh = shapes.get_Item(i);
if (sh.getShapeType() == -1 || sh.getShapeType() == 0 || sh.getShapeType() == 1) {
sh.getLineFormat().getFillFormat().getSolidFillColor().setColor(java.awt.Color.WHITE);
sh.getLineFormat().setWidth(0);
}
}
ISmartArtShapeCollection shapes2 = chNode1.getShapes();
for (int i = 0; i < shapes2.size(); i++) {
ISmartArtShape sh = shapes2.get_Item(i);
if (sh.getShapeType() == -1 || sh.getShapeType() == 0 || sh.getShapeType() == 1) {
sh.getLineFormat().getFillFormat().getSolidFillColor().setColor(java.awt.Color.WHITE);
sh.getLineFormat().setWidth(0);
}
}
// Save Presentation
pres.save("C:\\Users\\user_name\\Desktop\\ppt_to_pdf.pdf", SaveFormat.Pdf);
pres.save("C:\\Users\\v-user_name\\Desktop\\ppt.pptx", SaveFormat.Pptx);
Observe the difference in color of connector lines in PDF and PPT.