Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
[Android SDK] Issue with text/font not rendered |
Post Reply |
Author | |
k.szalach
Beginner Joined: 28 Sep 23 Location: Poland Status: Offline Points: 2 |
Post Options
Thanks(0)
Posted: 28 Sep 23 at 8:29AM |
Hello!
I know that library is already discontinued from being supported, but maybe someone will be able to help. I have a PDF file which has a text that uses FreeSans font. There are also some other fonts in this PDF, but only text with FreeSans is not rendered at all when using quick PDF SDK (we use rendertobitmap option). I've tried to check if the fonts are embedded into the file and using Adobe Reader it seems that only Helvetica is embedded. I confirmed this also by checking within library using FindFonts and getting the font data: (0 until pdfLibrary.FindFonts()).forEach { fontIndex -> And the outcome is: Font: , , 0, 0, 0, Font: Helvetica, , 0, 2, 0, QuickPDFF03FF2F0B Although no clue what the first font is, but I guess it doesn't matter. As checked here http://www.quickpdf.org/forum/nonembedded-fonts-not-working_topic3601.html it looks like there are only few embedded fonts in the library. So does it mean that if other fonts are not embedded into PDF file, then the library will not be able to display them? My questions are: - is it possible to somehow replace on-the-fly fonts, that are not available with some other standard ones? I've seen a method ReplaceFonts, but I couldn't find any info about it. - is it possible to add font on-the-fly so the library will be able to render them? All examples I've found are using adding fonts when creating new text or filling form fields, so I don't feel they apply to our use case. And now, the most strange part is that this issue occurs only on Android 12, 13 and 14, but not on Android 9, 10 or 11. So it looks like something also changed in Android system that makes it not working anymore. I also did profiling on Android 13 and it looks like there is some issue with SelectFont function in library, which makes significant amount of time. Appreciate any help, thank you!
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Krzysztof ... welcome here :)
Don't think that nobody is looking here but QuickPDF is mainly used with windows development. Due to this experts regarding android will be less here. So please be patient and don't stop trying yourself ;-) |
|
Cheers,
Ingo |
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
If the font is not embedded in the PDF and not on the device, then clearly text in that specific font will not be displayed. I am one of the Windows developers whom Ingo describes as the majority here, so I cannot help you with details of how and whether fonts can be substituted on Android, or how you would find a suitable font to substitute on an Android device; sorry.
|
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Tim :)
But i think that the used pdf-reader tries to display the text in a similar layout if the exact font is missing?
|
|
Cheers,
Ingo |
|
tfrost
Senior Member Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
Post Options
Thanks(0)
|
But I think the 'used pdf-reader' in this case may be the app which Krzysztof is writing, in which the PDF is to be displayed or rendered. And I have no idea how different versions (or any versions) of Android deal with fonts, so there is little more I can say.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store