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 -> val fontId = pdfLibrary.GetFontID(fontIndex) pdfLibrary.SelectFont(fontId) Trace.i(TAG, "Font: ${pdfLibrary.FontName()}, ${pdfLibrary.FontFamily()}, ${pdfLibrary.FontSize()}, ${pdfLibrary.FontType()}, ${pdfLibrary.FontHasKerning()}, ${pdfLibrary.FontReference()}") }
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" rel="nofollow - 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. https://ibb.co/tPqZTX0" rel="nofollow">
Appreciate any help, thank you!
|