Hello everone,
- Document.getLocalFontPath () - shows the system folder in which project will look for fonts.
- Document.setLocalFontPath (String) - Setting font path to custom folder
String path = "/usr/share/fonts/truetype/msttcorefonts/";
// Adding a single font directory
// com.aspose.pdf.Document.addLocalFontPath(path);
// setting the user list for standard font directories
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
list.add(path);
.....
I did it, but doesn’t worked. i put my fonts in the path:
/home/wxime/public_ftp/fontes
And when i printed the code Document.getLocalFontPaths(), i can see:
[%WINDIR%/Fonts/, /usr/openwin/lib/X11/fonts/TrueType/, /usr/local/share/fonts/, $home/.fonts/, /usr/share/fonts/truetype/, /usr/X11R6/lib/X11/fonts/ttfonts/, /Library/Fonts/, ~/Library/Fonts/, /Network/Library/Fonts/, /System/Library/Fonts/, ~/.fonts/, /usr/share/fonts/, /usr/share/X11/fonts/TTF/, /system/fonts/, /home/wxime/public_ftp/fontes]
But after that the same error happen:
aused by: class com.aspose.pdf.internal.p391.z93: Cannot find any fonts installed on the system.
Hi Rafael,
Hi Rafael,
I’m also experiencing this issue in an HPUX environment. I’m just replying to this thread so that I get updated on any fixes or workarounds.
Hi Brett,BrettMSD:I'm also experiencing this issue in an HPUX environment. I'm just replying to this thread so that I get updated on any fixes or workarounds.
Any idea about my problem?
Hi Rafael,rafaximenes1:Any idea about my problem?
rafaximenes1:Any idea about my problem?Tks
Hi,
.Hi Nayyar,
I'm getting the error when converting a simple HTML string into a PDF. Convert a word document works fine.
I use the following code for the conversion:
try (InputStream inStream = new ByteArrayInputStream(htmlString.getBytes(StandardCharsets.UTF_8))) {
com.aspose.pdf.HtmlLoadOptions htmloptions = new com.aspose.pdf.HtmlLoadOptions();
com.aspose.pdf.Document document = new com.aspose.pdf.Document(inStream, htmloptions);
document.save(filename);
}
I have a folder with fonts and I add the fonts like this:
com.aspose.pdf.Document.addLocalFontPath(fontDeploymentDirectory.getAbsolutePath() + "/");
I also use FontSettings to load fonts.
I get the following stack trace when creating a new Document object:
class com.aspose.pdf.internal.ms.System.z93: Cannot find any fonts installed on the system.
com.aspose.pdf.internal.p307.z10.m1(Unknown Source)
com.aspose.pdf.internal.p307.z10.m1(Unknown Source)
com.aspose.pdf.internal.p307.z10.m1(Unknown Source)
com.aspose.pdf.internal.p193.z2.m1(Unknown Source)
com.aspose.pdf.internal.p192.z10.m1(Unknown Source)
com.aspose.pdf.internal.p203.z3.m1(Unknown Source)
com.aspose.pdf.internal.p175.z33.(Unknown Source)
com.aspose.pdf.internal.p175.z5.m1(Unknown Source)
com.aspose.pdf.internal.p175.z5.(Unknown Source)
com.aspose.pdf.internal.p202.z23.m1(Unknown Source)
com.aspose.pdf.internal.p183.z13.(Unknown Source)
com.aspose.pdf.internal.p174.z4.m4(Unknown Source)
com.aspose.pdf.internal.p174.z4.(Unknown Source)
com.aspose.pdf.internal.p174.z5.m1(Unknown Source)
com.aspose.pdf.internal.p170.z22.m1(Unknown Source)
com.aspose.pdf.internal.p170.z22.m1(Unknown Source)
com.aspose.pdf.internal.p346.z1.m1(Unknown Source)
com.aspose.pdf.internal.p346.z1.m1(Unknown Source)
com.aspose.pdf.z34.m1(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
Hopefully my issue is identical and will be addressed in version 11.
BrettMSD:Hi,Can you please provide an ETA on the fix, also will you be providing a free hot fix for this issue now ?Cheers
Hi RafaelBrettMSD:.Hi Nayyar,
I'm getting the error when converting a simple HTML string into a PDF. Convert a word document works fine.
I use the following code for the conversion:
try (InputStream inStream = new ByteArrayInputStream(htmlString.getBytes(StandardCharsets.UTF_8))) {
com.aspose.pdf.HtmlLoadOptions htmloptions = new com.aspose.pdf.HtmlLoadOptions();
com.aspose.pdf.Document document = new com.aspose.pdf.Document(inStream, htmloptions);
document.save(filename);
}
I have a folder with fonts and I add the fonts like this:
com.aspose.pdf.Document.addLocalFontPath(fontDeploymentDirectory.getAbsolutePath() + "/");
I also use FontSettings to load fonts.
I get the following stack trace when creating a new Document object:
class com.aspose.pdf.internal.ms.System.z93: Cannot find any fonts installed on the system.
com.aspose.pdf.internal.p307.z10.m1(Unknown Source)
com.aspose.pdf.internal.p307.z10.m1(Unknown Source)
com.aspose.pdf.internal.p307.z10.m1(Unknown Source)
com.aspose.pdf.internal.p193.z2.m1(Unknown Source)
com.aspose.pdf.internal.p192.z10.m1(Unknown Source)
com.aspose.pdf.internal.p203.z3.m1(Unknown Source)
com.aspose.pdf.internal.p175.z33.(Unknown Source)
com.aspose.pdf.internal.p175.z5.m1(Unknown Source)
com.aspose.pdf.internal.p175.z5.(Unknown Source)
com.aspose.pdf.internal.p202.z23.m1(Unknown Source)
com.aspose.pdf.internal.p183.z13.(Unknown Source)
com.aspose.pdf.internal.p174.z4.m4(Unknown Source)
com.aspose.pdf.internal.p174.z4.(Unknown Source)
com.aspose.pdf.internal.p174.z5.m1(Unknown Source)
com.aspose.pdf.internal.p170.z22.m1(Unknown Source)
com.aspose.pdf.internal.p170.z22.m1(Unknown Source)
com.aspose.pdf.internal.p346.z1.m1(Unknown Source)
com.aspose.pdf.internal.p346.z1.m1(Unknown Source)
com.aspose.pdf.z34.m1(Unknown Source)
com.aspose.pdf.ADocument.m1(Unknown Source)
com.aspose.pdf.ADocument.(Unknown Source)
com.aspose.pdf.Document.(Unknown Source)
Hopefully my issue is identical and will be addressed in version 11.
Hi Nayyar<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
We are running on HP-UX B.11.31 ia64
Java -version gives me:
java version "1.7.0.03"
Java(TM) SE Runtime Environment (build 1.7.0.03-jinteg_2012_10_05_02_40-b00)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09-jre1.7.0.03-rc1, mixed mode)
Cheers Brett
Why is there no hot fix available if you know that this is an issue ? Why make us wait another 2 weeks with a production fault ?
Hi Rafael,
Hi Rafael,
Thanks very much Aspose Team, I´m looking for my release