Dear Support Team,
I am trying to convert word to PDF using the following Aspose Android library.
My PDF converted successfully for many devices, but in one device I am facing an error in converted pdf text not shown properly.
Android Devie Details:
Device Name: One plus 3T
Device Version: Android 9
Library:
implementation (group: ‘com.aspose’, name: ‘aspose-words’, version: ‘20.9’, classifier: ‘android.via.java’)
Can you please look into this and resolved my issue.
Please find the attached PDF for more reference.
I2P Description New (1).pdf (36.0 KB)
Thanks,
Vijay
@PDFReader,
Make sure your Android App has storage, read, write permissions etc. In case the problem still remains, then please ZIP and attach your input Word document, Aspose.Words for Android via Java 21.2 generated PDF file showing the undesired behavior and the font file(s) used in Word document here for testing. We will then investigate the issue on our end and provide you more information.
Hello Awais,
PFA doc file.
(Attachment I2P Description.docx is missing)
@PDFReader,
I am afraid, we do not see any attachments in your previous post . Can you please ZIP and reattach those Word and 21.2 generated PDF files here for our reference?
Hello Awais,
Please find attached the zip file.
Thanks,
Vijay
I2P Description.zip (14.3 KB)
@PDFReader,
Please copy the latest version of following font file from Windows 10 machine into a separate folder inside Android device and try running the following code of Aspose.Words:
Document doc = new Document("input.docx");
FontSettings fontSettings = new FontSettings();
addFontFolder(fontSettings, myDir + "CustomFonts/");
doc.setFontSettings(fontSettings);
doc.save("output.pdf");
private static void addFontFolder(FontSettings fontSettings, String folder)
{
FontSourceBase[] fontSourceBases = fontSettings.getFontsSources();
FontSourceBase[] newFontSourceBases = new FontSourceBase[fontSourceBases.length + 1];
System.arraycopy(fontSourceBases, 0, newFontSourceBases, 0, fontSourceBases.length);
newFontSourceBases[newFontSourceBases.length - 1] = new FolderFontSource(folder, true);
fontSettings.setFontsSources(newFontSourceBases);
}
Do you see any missing fonts related warning messages? Please check the following articles: