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

Free Support Forum - aspose.com

Distance of some characters get too close in the result of saving in SVG format

Hi there


We are using Aspose Slide 16.12.0 to save PowerPoint files in to SVG format on the Linux environment.

And here is our code for test:
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
Presentation pre;

if (StringUtils.isEmpty(password)) {
pre = new Presentation(filePath);
} else {
LoadOptions loadOps = new LoadOptions();
loadOps.setPassword(password);
pre = new Presentation(filePath, loadOps);
}

String dirName = UUID.randomUUID().toString();
File file = new File("" + dirName);
file.mkdirs();

for (int i = 0; i < pre.getSlides().size(); i++) {
ISlide slide = pre.getSlides().get_Item(i);

slide.writeAsSvg(outputStream);
IoUtil.write(new FileOutputStream("" + dirName + “/” + (i + 1) + “.origin.svg”), outputStream.toByteArray());
}

At first, most of characters in the result are stuck together with each other.
We installed some fonts, and things are getting better, but there are still some characters do have this problem.

Here is the result of the command fc-list :
/usr/share/fonts/forread/TW-Sung-98_1.ttf: TW-Sung,全字庫正宋體:style=Regular
/usr/share/fonts/forread/TW-Kai-Ext-B-98_1.ttf: TW-Kai-Ext-B,全字庫正楷體 Ext-B:style=Regular
/usr/share/fonts/forread/MSJHBD.TTC: Microsoft JhengHei,微軟正黑體:style=Negreta,Bold,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/forread/wt011.ttf: HanWangHeiLight,王漢宗細黑體繁:style=Regular
/usr/share/X11/fonts/Type1/c0611bt_.pfb: Courier 10 Pitch:style=Bold Italic
/usr/share/X11/fonts/Type1/UTBI____.pfa: Utopia:style=Bold Italic
/usr/share/fonts/forread/msgothic.ttc: MS Gothic,MS ゴシック:style=Regular,標準
/usr/share/fonts/forread/msgothic.ttc: MS UI Gothic:style=Regular,標準
/usr/share/fonts/forread/timesbi.ttf: Times New Roman:style=Bold Italic,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,nghiêng đậm,Lodi etzana
/usr/share/X11/fonts/Type1/c0419bt_.pfb: Courier 10 Pitch:style=Regular
/usr/share/fonts/forread/MSJHBD.TTC: Microsoft JhengHei UI:style=Negreta,Bold,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/forread/WINGDING.TTF: Wingdings:style=Regular,normal,Standard,Normaali,Normale,Standaard,Normálne,Navadno
/usr/share/fonts/forread/ARIALNBI.TTF: Arial,Arial Narrow:style=Narrow,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Bold Italic,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,Lodi etzana
/usr/share/fonts/forread/MSJH.TTC: Microsoft JhengHei UI:style=Normal,Regular,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/forread/arialbi.ttf: Arial:style=Bold Italic,Negreta cursiva,tučné kurzíva,fed kursiv,Fett Kursiv,Έντονα Πλάγια,Negrita Cursiva,Lihavoitu Kursivoi,Gras Italique,Félkövér dőlt,Grassetto Corsivo,Vet Cursief,Halvfet Kursiv,Pogrubiona kursywa,Negrito Itálico,Полужирный Курсив,Tučná kurzíva,Fet Kursiv,Kalın İtalik,Krepko poševno,nghiêng đậm,Lodi etzana
/usr/share/fonts/forread/arialbd.ttf: Arial:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,đậm,Lodia
/usr/share/fonts/forread/mingliub.ttc: PMingLiU-ExtB,新細明體-ExtB:style=Regular
/usr/share/X11/fonts/Type1/c0648bt_.pfb: Bitstream Charter:style=Regular
/usr/share/fonts/forread/wt001.ttf: HanWangMingLight,王漢宗細明體繁:style=Regular
/usr/share/fonts/forread/WEBDINGS.TTF: Webdings:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/forread/ARIALNB.TTF: Arial,Arial Narrow:style=Narrow,Negreta,tučné,fed,Fett,Έντονα,Bold,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kalın,Krepko,Lodia
/usr/share/fonts/forread/MSJH.TTC: Microsoft JhengHei,微軟正黑體:style=Normal,Regular,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/forread/times.ttf: Times New Roman:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
/usr/share/fonts/forread/MSJHL.TTC: Microsoft JhengHei UI,Microsoft JhengHei UI Light:style=Light,Regular
/usr/share/fonts/forread/NotoSansCJKtc-Regular.otf: Noto Sans CJK TC,Noto Sans CJK TC Regular:style=Regular
/usr/share/fonts/opensymbol/opens___.ttf: OpenSymbol:style=Regular
/usr/share/fonts/forread/MSJHL.TTC: Microsoft JhengHei,微軟正黑體,微軟正黑體 Light,Microsoft JhengHei Light:style=Light,Regular
/usr/share/fonts/forread/timesbd.ttf: Times New Roman:style=Bold,Negreta,tučné,fed,Fett,Έντονα,Negrita,Lihavoitu,Gras,Félkövér,Grassetto,Vet,Halvfet,Pogrubiona,Negrito,Полужирный,Fet,Kalın,Krepko,đậm,Lodia
/usr/share/fonts/forread/mingliub.ttc: MingLiU_HKSCS-ExtB,細明體_HKSCS-ExtB:style=Regular
/usr/share/X11/fonts/Type1/cursor.pfa: Cursor:style=Regular
/usr/share/X11/fonts/Type1/UTB_____.pfa: Utopia:style=Bold
/usr/share/X11/fonts/Type1/c0583bt_.pfb: Courier 10 Pitch:style=Bold
/usr/share/fonts/forread/arial.ttf: Arial:style=Regular,Normal,obyčejné,Standard,Κανονικά,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,thường,Arrunta
/usr/share/fonts/forread/timesi.ttf: Times New Roman:style=Italic,cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
/usr/share/fonts/forread/ARIALNI.TTF: Arial,Arial Narrow:style=Narrow,Cursiva,kurzíva,kursiv,Πλάγια,Italic,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,Etzana
/usr/share/X11/fonts/Type1/UTI_____.pfa: Utopia:style=Italic
/usr/share/fonts/forread/mingliub.ttc: MingLiU-ExtB,細明體-ExtB:style=Regular
/usr/share/fonts/forread/ariblk.ttf: Arial,Arial Black:style=Black,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/forread/ariali.ttf: Arial:style=Italic,Cursiva,kurzíva,kursiv,Πλάγια,Kursivoitu,Italique,Dőlt,Corsivo,Cursief,Kursywa,Itálico,Курсив,İtalik,Poševno,nghiêng,Etzana
/usr/share/X11/fonts/Type1/c0582bt_.pfb: Courier 10 Pitch:style=Italic
/usr/share/fonts/forread/msgothic.ttc: MS PGothic,MS Pゴシック:style=Regular,標準
/usr/share/fonts/forread/TW-Kai-Plus-98_1.ttf: TW-Kai-Plus,全字庫正楷體 Plus:style=Regular
/usr/share/fonts/forread/wt006.ttf: HanWangYenLight,王漢宗細圓體繁:style=Regular
/usr/share/fonts/forread/TW-Kai-98_1.ttf: TW-Kai,全字庫正楷體:style=Regular
/usr/share/X11/fonts/Type1/c0633bt_.pfb: Bitstream Charter:style=Bold Italic
/usr/share/fonts/forread/ARIALN.TTF: Arial,Arial Narrow:style=Narrow,Normal,obyčejné,Standard,Κανονικά,Regular,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/X11/fonts/Type1/c0649bt_.pfb: Bitstream Charter:style=Italic
/usr/share/X11/fonts/Type1/c0632bt_.pfb: Bitstream Charter:style=Bold
/usr/share/X11/fonts/Type1/UTRG____.pfa: Utopia:style=Regular

I have also uploaded the comparison image, the PowerPoint file, and the result.
The password for the file is "123456"
Please check the attachment.

And about this issue:
1.Is there some kind of font missing?
2.Is there some options to fix this?

Please help us to solve this problem, thank you.

Craig

Hi Craig,


I have worked with presentation and source code shared by you using Aspose.Slides for JAVA 17.1.0 and able to observe the issue. A ticket with ID SLIDESJAVA-35888 has been added in our issue tracking system to resolve the issue. This thread has been associated with the ticket so that we share notification with you once issue will be fixed.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-35888) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.