I downloaded updated version and set into our project but still our problem is not resolved. We are getting same that square boxes in-place of math sign into the same environment.
From
Nitin Chopkar
Hi Babar,
I applied that code which gives font information and got below out put please check it out what is wrong their, i am not understanding that used and missed font.
1. Instruction :
String[] allFontList = com.aspose.imaging.fileformats.metafile.FontSettings.getAllFonts();
Out put :FATAL TP-Processor2 AsposeImageConverter - ------------------ All Font ------------
FATAL TP-Processor2 AsposeImageConverter - Andale Mono
FATAL TP-Processor2 AsposeImageConverter - Arial
FATAL TP-Processor2 AsposeImageConverter - Arial Black
FATAL TP-Processor2 AsposeImageConverter - Bitstream Charter
FATAL TP-Processor2 AsposeImageConverter - Bitstream Vera Sans
FATAL TP-Processor2 AsposeImageConverter - Bitstream Vera Sans Mono
FATAL TP-Processor2 AsposeImageConverter - Bitstream Vera Serif
FATAL TP-Processor2 AsposeImageConverter - Century Schoolbook L
FATAL TP-Processor2 AsposeImageConverter - Comic Sans MS
FATAL TP-Processor2 AsposeImageConverter - Courier New
FATAL TP-Processor2 AsposeImageConverter - Dialog
FATAL TP-Processor2 AsposeImageConverter - DialogInput
FATAL TP-Processor2 AsposeImageConverter - Dingbats
FATAL TP-Processor2 AsposeImageConverter - Georgia
FATAL TP-Processor2 AsposeImageConverter - Hershey
FATAL TP-Processor2 AsposeImageConverter - Impact
FATAL TP-Processor2 AsposeImageConverter - Lucida Bright
FATAL TP-Processor2 AsposeImageConverter - Lucida Sans
FATAL TP-Processor2 AsposeImageConverter - Lucida Sans Typewriter
FATAL TP-Processor2 AsposeImageConverter - Monospaced
FATAL TP-Processor2 AsposeImageConverter - Nimbus Mono L
FATAL TP-Processor2 AsposeImageConverter - Nimbus Roman No9 L
FATAL TP-Processor2 AsposeImageConverter - Nimbus Sans L
FATAL TP-Processor2 AsposeImageConverter - Nimbus Sans L Condensed
FATAL TP-Processor2 AsposeImageConverter - SansSerif
FATAL TP-Processor2 AsposeImageConverter - Serif
FATAL TP-Processor2 AsposeImageConverter - Standard Symbols L
FATAL TP-Processor2 AsposeImageConverter - Tahoma
FATAL TP-Processor2 AsposeImageConverter - Times New Roman
FATAL TP-Processor2 AsposeImageConverter - Trebuchet MS
FATAL TP-Processor2 AsposeImageConverter - URW Bookman L
FATAL TP-Processor2 AsposeImageConverter - URW Chancery L
FATAL TP-Processor2 AsposeImageConverter - URW Gothic L
FATAL TP-Processor2 AsposeImageConverter - URW Palladio L
FATAL TP-Processor2 AsposeImageConverter - Utopia
FATAL TP-Processor2 AsposeImageConverter - Verdana
FATAL TP-Processor2 AsposeImageConverter - Webdings
2.Instruction :
com.aspose.imaging.fileformats.metafile.MetafileImage metafile = new com.aspose.imaging.fileformats.metafile.WmfMetafileImage(WMFfilePath);FATAL TP-Processor2 AsposeImageConverter - ------------------ All Used Font ------------
String[] usedList = metafile.getUsedFonts();
Out put:
FATAL TP-Processor2 AsposeImageConverter - Times New Roman
FATAL TP-Processor2 AsposeImageConverter - Symbol
FATAL TP-Processor2 AsposeImageConverter - System
3.Instruction:
com.aspose.imaging.fileformats.metafile.MetafileImage metafile = new com.aspose.imaging.fileformats.metafile.WmfMetafileImage(WMFfilePath);FATAL TP-Processor2 AsposeImageConverter - ------------------ All Missed Font ------------
String[] missedList = metafile.getMissedFonts();
Out Put:
FATAL TP-Processor2 AsposeImageConverter - Symbol
FATAL TP-Processor2 AsposeImageConverter - System
Also help me out to understands Specifying Substitute Fonts what is that and how to specify substitute font and when to used that?.
From
Nitin Chopkar
Please update us on my previous post.
From
Nitin Chopkar
Hi Nitin,
All fonts part lists all of the fonts available on your server and can be used in the input WMF. If any of these fonts is used in the input document, it will be rendered correctly in the output document.
Used fonts part lists the fonts used in your input document (whether those are installed or not installed on your server). Missed fonts part lists the fonts which are used in your input document but not installed on your server. You need to install missed fonts on your server to render the documents correctly.
In short you can compare used fonts and missed fonts to check which required fonts are installed on your server and which are not to render your documents correctly.
As far as your second query is concerned, substitute fonts feature allows you to specify the replacement of missing fonts. Lets consider your example where Times New Roman, System and Symbol fonts are used in your input document but System and Symbol are not installed on your server. These two fonts will automatically be replaced with any other font installed on your system.
If you do not want to automatically replace System and Symbol fonts with other fonts, you can use this feature to ask Aspose.Imaging to use your specified font in place of missing System and Symbol fonts.
This feature is useful when you cannot install all required fonts (used in your documents) on your server. Sometimes it is not possible to install all fonts (specially paid fonts) and you want to replace them with some free open source fonts. You can install replacement fonts on your server and use this feature to replace any missing font with an installed font.
Best Regards,
Please guide us, what should we have to do to resolve our problem at live server.
From
Nitin Chopkar
com.aspose.imaging.fileformats.metafile.FontSettings.addFontSubstitutes("Symbol", substituteFontName );
com.aspose.imaging.fileformats.metafile.FontSettings.addFontsFolder(folderContainingSymbolFont);
Hi,
I done with below things which you mention in previous post in our problematic server. But still the problem is same. I am unable to understand what should i do? how to detect problem because whatever font you required that installed their. Why that fonts not recognizing by your code.
The things which you asked :
particular case, the mathematical symbols such as “+, -, =” are not
getting drawn correctly. These symbols are present in the Webdings font.
Assuming that the Webdings font is available on your hosted server,
your code will look like as follow.
com.aspose.imaging.fileformats.metafile.FontSettings.addFontSubstitutes("Symbol", substituteFontName );
com.aspose.imaging.fileformats.metafile.FontSettings.addFontsFolder(folderContainingSymbolFont);
From
NItin Chopkar
Hi,
As per your reply I have installed the missing fonts on problematic server.
But it’s still not working.
Out Put :
FATAL TP-Processor3 AsposeImageConverterServlet - com.aspose.imaging.BuildVersionInfo.ASSEMBLY_VERSION : 3.0.2.0
FATAL TP-Processor3 AsposeImageConverterServlet - Can Display + : : true
FATAL TP-Processor3 AsposeImageConverterServlet - Can Display - : : true
FATAL TP-Processor3 AsposeImageConverterServlet - Can Display = : : true
FATAL TP-Processor3 AsposeImageConverter - =========== Aspose Image license done ==========
FATAL TP-Processor3 AsposeImageConverter - ------------------ All Font ------------
FATAL TP-Processor3 AsposeImageConverter - Andale Mono
FATAL TP-Processor3 AsposeImageConverter - Arial
FATAL TP-Processor3 AsposeImageConverter - Arial Black
FATAL TP-Processor3 AsposeImageConverter - Bitstream Charter
FATAL TP-Processor3 AsposeImageConverter - Bitstream Vera Sans
FATAL TP-Processor3 AsposeImageConverter - Bitstream Vera Sans Mono
FATAL TP-Processor3 AsposeImageConverter - Bitstream Vera Serif
FATAL TP-Processor3 AsposeImageConverter - Century Schoolbook L
FATAL TP-Processor3 AsposeImageConverter - Comic Sans MS
FATAL TP-Processor3 AsposeImageConverter - Courier New
FATAL TP-Processor3 AsposeImageConverter - Dialog
FATAL TP-Processor3 AsposeImageConverter - DialogInput
FATAL TP-Processor3 AsposeImageConverter - Dingbats
FATAL TP-Processor3 AsposeImageConverter - Georgia
FATAL TP-Processor3 AsposeImageConverter - Hershey
FATAL TP-Processor3 AsposeImageConverter - Impact
FATAL TP-Processor3 AsposeImageConverter - Lucida Bright
FATAL TP-Processor3 AsposeImageConverter - Lucida Sans
FATAL TP-Processor3 AsposeImageConverter - Lucida Sans Typewriter
FATAL TP-Processor3 AsposeImageConverter - Monospaced
FATAL TP-Processor3 AsposeImageConverter - Nimbus Mono L
FATAL TP-Processor3 AsposeImageConverter - Nimbus Roman No9 L
FATAL TP-Processor3 AsposeImageConverter - Nimbus Sans L
FATAL TP-Processor3 AsposeImageConverter - Nimbus Sans L Condensed
FATAL TP-Processor3 AsposeImageConverter - SansSerif
FATAL TP-Processor3 AsposeImageConverter - Serif
FATAL TP-Processor3 AsposeImageConverter - Standard Symbols L
FATAL TP-Processor3 AsposeImageConverter - Tahoma
FATAL TP-Processor3 AsposeImageConverter - Times New Roman
FATAL TP-Processor3 AsposeImageConverter - Trebuchet MS
FATAL TP-Processor3 AsposeImageConverter - URW Bookman L
FATAL TP-Processor3 AsposeImageConverter - URW Chancery L
FATAL TP-Processor3 AsposeImageConverter - URW Gothic L
FATAL TP-Processor3 AsposeImageConverter - URW Palladio L
FATAL TP-Processor3 AsposeImageConverter - Utopia
FATAL TP-Processor3 AsposeImageConverter - Verdana
FATAL TP-Processor3 AsposeImageConverter - Webdings
FATAL TP-Processor3 AsposeImageConverter - ------------------ All Used Font ------------
FATAL TP-Processor3 AsposeImageConverter - Times New Roman
FATAL TP-Processor3 AsposeImageConverter - Symbol
FATAL TP-Processor3 AsposeImageConverter - System
FATAL TP-Processor3 AsposeImageConverter - ------------------ All Missed Font ------------
FATAL TP-Processor3 AsposeImageConverter - Symbol
FATAL TP-Processor3 AsposeImageConverter - System
Please help out from that problem.
Regards
Anup
Hi,
The steps what we did below:
Step 1 :
copy and paste below ttf file under our “/.fonts” from our working linux environment.
1. symbol.ttf
2. system.ttf
3. Times New Roman.ttf
Step 2 : ran below command
Command :- fc-cache -fv
Code :
File wmfFile = new File(filePath);
filePath = filePath.replaceAll(".wmf", “.png”);
File pngFile = new File(filePath);
FontSettings.addFontsFolder("/joyoflea/.fonts");
String[] allFont = asposeImageConverter.getAllFont();
String[] usedFont = asposeImageConverter.getUsedFontList(wmfFile);
String[] missFont = asposeImageConverter.getMissingFontList(wmfFile);
try{
WmfMetafileImage metafile = new WmfMetafileImage(wmfFile.getAbsolutePath());
metafile.save(pngFile.getAbsolutePath(), new PngOptions());
}catch(Exception exception){
exception.printStackTrace();
logger.error(" ConvertWMTOPNG : "+exception);
}
Out Put :
FATAL TP-Processor11 AsposeImageConverterServlet - com.aspose.imaging.BuildVersionInfo.ASSEMBLY_VERSION : 3.0.2.0
FATAL TP-Processor11 AsposeImageConverterServlet - Can Display + : : true
FATAL TP-Processor11 AsposeImageConverterServlet - Can Display - : : true
FATAL TP-Processor11 AsposeImageConverterServlet - Can Display = : : true
FATAL TP-Processor11 AsposeImageConverter - =========== Aspose Image license done ==========
FATAL TP-Processor11 AsposeImageConverter - ------------------ All Font ------------
FATAL TP-Processor11 AsposeImageConverter - Andale Mono
FATAL TP-Processor11 AsposeImageConverter - Arial
FATAL TP-Processor11 AsposeImageConverter - Arial Black
FATAL TP-Processor11 AsposeImageConverter - Bitstream Charter
FATAL TP-Processor11 AsposeImageConverter - Bitstream Vera Sans
FATAL TP-Processor11 AsposeImageConverter - Bitstream Vera Sans Mono
FATAL TP-Processor11 AsposeImageConverter - Bitstream Vera Serif
FATAL TP-Processor11 AsposeImageConverter - Century Schoolbook L
FATAL TP-Processor11 AsposeImageConverter - Comic Sans MS
FATAL TP-Processor11 AsposeImageConverter - Courier New
FATAL TP-Processor11 AsposeImageConverter - Dialog
FATAL TP-Processor11 AsposeImageConverter - DialogInput
FATAL TP-Processor11 AsposeImageConverter - Dingbats
FATAL TP-Processor11 AsposeImageConverter - Georgia
FATAL TP-Processor11 AsposeImageConverter - Hershey
FATAL TP-Processor11 AsposeImageConverter - Impact
FATAL TP-Processor11 AsposeImageConverter - Lucida Bright
FATAL TP-Processor11 AsposeImageConverter - Lucida Sans
FATAL TP-Processor11 AsposeImageConverter - Lucida Sans Typewriter
FATAL TP-Processor11 AsposeImageConverter - Monospaced
FATAL TP-Processor11 AsposeImageConverter - Nimbus Mono L
FATAL TP-Processor11 AsposeImageConverter - Nimbus Roman No9 L
FATAL TP-Processor11 AsposeImageConverter - Nimbus Sans L
FATAL TP-Processor11 AsposeImageConverter - Nimbus Sans L Condensed
FATAL TP-Processor11 AsposeImageConverter - SansSerif
FATAL TP-Processor11 AsposeImageConverter - Serif
FATAL TP-Processor11 AsposeImageConverter - Standard Symbols L
FATAL TP-Processor11 AsposeImageConverter - Tahoma
FATAL TP-Processor11 AsposeImageConverter - Times New Roman
FATAL TP-Processor11 AsposeImageConverter - Trebuchet MS
FATAL TP-Processor11 AsposeImageConverter - URW Bookman L
FATAL TP-Processor11 AsposeImageConverter - URW Chancery L
FATAL TP-Processor11 AsposeImageConverter - URW Gothic L
FATAL TP-Processor11 AsposeImageConverter - URW Palladio L
FATAL TP-Processor11 AsposeImageConverter - Utopia
FATAL TP-Processor11 AsposeImageConverter - Verdana
FATAL TP-Processor11 AsposeImageConverter - Webdings
FATAL TP-Processor11 AsposeImageConverter - ------------------ All Used Font ------------
FATAL TP-Processor11 AsposeImageConverter - Times New Roman
FATAL TP-Processor11 AsposeImageConverter - Symbol
FATAL TP-Processor11 AsposeImageConverter - System
FATAL TP-Processor11 AsposeImageConverter - ------------------ All Missed Font ------------
FATAL TP-Processor11 AsposeImageConverter - Symbol
FATAL TP-Processor11 AsposeImageConverter - System
Let us know if you required more information related that issues.
From
Nitin Chopkar
Please update us regarding our previous post
Hi,
Please update us regarding that issues.
From
Nitin Chopkar
Output:
------------------------
Abyssinica SIL
Bitstream Charter
Century Schoolbook L
Courier 10 Pitch
DejaVu Sans
DejaVu Sans Mono
DejaVu Serif
Dialog
DialogInput
Dingbats
Droid Arabic Naskh
Droid Sans
Droid Sans Armenian
Droid Sans Ethiopic
Droid Sans Fallback
Droid Sans Georgian
Droid Sans Hebrew
Droid Sans Japanese
Droid Sans Mono
Droid Sans Thai
Droid Serif
FreeMono
FreeSans
FreeSerif
gargi
Garuda
KacstArt
KacstBook
KacstDecorative
KacstDigital
KacstFarsi
KacstLetter
KacstNaskh
KacstOffice
KacstOne
KacstPen
KacstPoster
KacstQurn
KacstScreen
KacstTitle
KacstTitleL
Kedage
Khmer OS
Khmer OS System
Kinnari
Liberation Mono
Liberation Sans
Liberation Sans Narrow
Liberation Serif
LKLUG
Lohit Bengali
Lohit Devanagari
Lohit Gujarati
Lohit Punjabi
Lohit Tamil
Loma
Lucida Bright
Lucida Sans
Lucida Sans Typewriter
Mallige
Meera
Monospaced
mry_KacstQurn
Mukti Narrow
NanumBarunGothic
NanumGothic
NanumMyeongjo
Nimbus Mono L
Nimbus Roman No9 L
Nimbus Sans L
Norasi
OpenSymbol
Padauk
Padauk Book
Phetsarath OT
Pothana2000
Purisa
Rachana
Rekha
Saab
SansSerif
Sawasdee
Serif
Standard Symbols L
Symbol
TakaoPGothic
Tibetan Machine Uni
Tlwg Typist
Tlwg Typo
TlwgMono
TlwgTypewriter
Ubuntu
Ubuntu Condensed
Ubuntu Light
Ubuntu Medium
Ubuntu Mono
Umpush
URW Bookman L
URW Chancery L
URW Gothic L
URW Palladio L
utkal
Vemana2000
Waree
Then we used the sample WMF file provided by you and executed the following lines of code respectively:
String[] usedFont = asposeImageConverter.getUsedFontList(wmfFile);
Output:
----------------
Times New Roman
Symbol
System
---------------
String[] missFont = asposeImageConverter.getMissingFontList(wmfFile);
Output:
----------------
Times New Roman
System
---------------
It was clearly shown that following fonts were missing:
- Times New Roman
- System
There are two ways to install the missing fonts
- Using Software Update Center
- Download the TTF font file and then use install option by opening the file and accessing the “install” button on the upper right end.
We tried both ways and executed the code snippet:
String[] missFont = asposeImageConverter.getMissingFontList(wmfFile);
Output:
----------------
Times New Roman
System
---------------
The output shown that issue was still there and was not resolved. We accessed the FONT directory on Windows operating system i.e. C:\Windows\Fonts, copied the required font file(s) and pasted on the problematic operating system. We carried out the above mentioned process to install the missing fonts. We again executed the following lines of code respectively:
String[] missFont = asposeImageConverter.getMissingFontList(wmfFile);
Output:
----------------
String[] allFontList = com.aspose.imaging.fileformats.metafile.FontSettings.getAllFonts();
Output:
----------------
Abyssinica SIL
Bitstream Charter
Century Schoolbook L
Courier 10 Pitch
DejaVu Sans
DejaVu Sans Mono
DejaVu Serif
Dialog
DialogInput
Dingbats
Droid Arabic Naskh
Droid Sans
Droid Sans Armenian
Droid Sans Ethiopic
Droid Sans Fallback
Droid Sans Georgian
Droid Sans Hebrew
Droid Sans Japanese
Droid Sans Mono
Droid Sans Thai
Droid Serif
FreeMono
FreeSans
FreeSerif
gargi
Garuda
KacstArt
KacstBook
KacstDecorative
KacstDigital
KacstFarsi
KacstLetter
KacstNaskh
KacstOffice
KacstOne
KacstPen
KacstPoster
KacstQurn
KacstScreen
KacstTitle
KacstTitleL
Kedage
Khmer OS
Khmer OS System
Kinnari
Liberation Mono
Liberation Sans
Liberation Sans Narrow
Liberation Serif
LKLUG
Lohit Bengali
Lohit Devanagari
Lohit Gujarati
Lohit Punjabi
Lohit Tamil
Loma
Lucida Bright
Lucida Sans
Lucida Sans Typewriter
Mallige
Meera
Monospaced
mry_KacstQurn
Mukti Narrow
NanumBarunGothic
NanumGothic
NanumMyeongjo
Nimbus Mono L
Nimbus Roman No9 L
Nimbus Sans L
Norasi
OpenSymbol
Padauk
Padauk Book
Phetsarath OT
Pothana2000
Purisa
Rachana
Rekha
Saab
SansSerif
Sawasdee
Serif
Standard Symbols L
Symbol
System
TakaoPGothic
Tibetan Machine Uni
Times New Roman
Tlwg Typist
Tlwg Typo
TlwgMono
TlwgTypewriter
Ubuntu
Ubuntu Condensed
Ubuntu Light
Ubuntu Medium
Ubuntu Mono
Umpush
URW Bookman L
URW Chancery L
URW Gothic L
URW Palladio L
utkal
Vemana2000
Waree
---------------
From the output it is now clear that there are no more missing fonts and getAllFont method returns complete list of fonts including the missing ones. That said, we have witnessed the font’s presence in the LiberOffice as well. Screen shots have been attached for your reference.
Hope the above information helps. Try the above solution at your end and feel free to contact us in case you have further comments or queries.
------------------------
Bitstream Charter
Century Schoolbook L
Courier 10 Pitch
DejaVu Sans
DejaVu Sans Mono
DejaVu Serif
Dialog
DialogInput
Dingbats
Droid Arabic Naskh
Droid Sans
Droid Sans Armenian
Droid Sans Ethiopic
Droid Sans Fallback
Droid Sans Georgian
Droid Sans Hebrew
Droid Sans Japanese
Droid Sans Mono
Droid Sans Thai
Droid Serif
FreeMono
FreeSans
FreeSerif
gargi
Garuda
KacstArt
KacstBook
KacstDecorative
KacstDigital
KacstFarsi
KacstLetter
KacstNaskh
KacstOffice
KacstOne
KacstPen
KacstPoster
KacstQurn
KacstScreen
KacstTitle
KacstTitleL
Kedage
Khmer OS
Khmer OS System
Kinnari
Liberation Mono
Liberation Sans
Liberation Sans Narrow
Liberation Serif
LKLUG
Lohit Bengali
Lohit Devanagari
Lohit Gujarati
Lohit Punjabi
Lohit Tamil
Loma
Lucida Bright
Lucida Sans
Lucida Sans Typewriter
Mallige
Meera
Monospaced
mry_KacstQurn
Mukti Narrow
NanumBarunGothic
NanumGothic
NanumMyeongjo
Nimbus Mono L
Nimbus Roman No9 L
Nimbus Sans L
Norasi
OpenSymbol
Padauk
Padauk Book
Phetsarath OT
Pothana2000
Purisa
Rachana
Rekha
Saab
SansSerif
Sawasdee
Serif
Standard Symbols L
Symbol
TakaoPGothic
Tibetan Machine Uni
Tlwg Typist
Tlwg Typo
TlwgMono
TlwgTypewriter
Ubuntu
Ubuntu Condensed
Ubuntu Light
Ubuntu Medium
Ubuntu Mono
Umpush
URW Bookman L
URW Chancery L
URW Gothic L
URW Palladio L
utkal
Vemana2000
Waree
- Times New Roman
- System
- Using Software Update Center
- Download the TTF font file and then use install option by opening the file and accessing the “install” button on the upper right end.
Hi,
Its working now by installing system font at our problematic server.
Thanks for your co-operation to resolving that issues.
From
NItin Chopkar
(Techior Solutions Pvt. Ltd.)