InputStream DocFile = new ByteArrayInputStream(inParamFile);
Document doc = new Document(DocFile );
// ConvertDoc
doc.save(outputByteArray,SaveFormat.PDF);
ResultFile = outputByteArray.toByteArray();
But I loose some characters appear as boxes and all the spacing gets messed up. How can I make sure that all characters show up and formatting is same? The font used in Word file is Arial with size 10.
Thanks for your inquiry. Could you please attach your input Word document you’re getting this problem with and output PDF file showing the undesired behavior here for testing? We will investigate the issue on our end and provide you more information.
Thanks for your inquiry. After an initial test with Aspose.Words for Java 17.2.0, we were unable to reproduce this issue on our end (see attached awjava-17.2.0.pdf). Please make sure that the following fonts are installed on your machine:
Thanks for your inquiry. You can copy required fonts from Windows machine. Please try installing/copying attached “fonts.zip” in your Linux machine. Hope, this helps.
Different Linux distributions store fonts in different folders. Aspose.Words looks for fonts in several well-known locations.
By default, Aspose.Words looks for the fonts in the following locations:
· /usr/share/fonts
· /usr/local/share/fonts
· /usr/X11R6/lib/X11/fonts
This default behavior will work for most Linux distributions, but not guaranteed to work all of the time. You might need to specify the location of true type fonts explicitly. To do this, you need to know where TrueType fonts are installed on your Linux distribution.