Why These Fonts Taking Longer To Load
Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3672
Printed Date: 26 Nov 24 at 5:07AM Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com
Topic: Why These Fonts Taking Longer To Load
Posted By: SalmaBegum
Subject: Why These Fonts Taking Longer To Load
Date Posted: 05 Feb 19 at 8:30AM
Greetings,
i am using following code to attach 3 fonts to my pdf file, but only this protects takes longer to complete rather than all other process.
adding 3 fonts taking almost 6 seconds, that's huge and user have to wait that long.. :(
dtTimer = DateTime.Now intF1 = objPDF.AddTrueTypeFontFromFileEx(strAppPath & "\fonts\SutonnyMJ-Regular.ttf", 0) MessageBox.Show(DateTime.Now.Subtract(dtTimer).TotalSeconds.ToString) REM dtTimer = DateTime.Now intF2 = objPDF.AddTrueTypeFontFromFileEx(strAppPath & "\fonts\SutonnyMJ-Bold.ttf", 0) MessageBox.Show(DateTime.Now.Subtract(dtTimer).TotalSeconds.ToString) REM dtTimer = DateTime.Now intF3 = objPDF.AddTrueTypeFontFromFileEx(strAppPath & "\fonts\Modded.ttf", 0) MessageBox.Show(DateTime.Now.Subtract(dtTimer).TotalSeconds.ToString) REM
|
if you need the font files to test, i can share..
thanks in advance...
best regards
|
Replies:
Posted By: SalmaBegum
Date Posted: 05 Feb 19 at 3:37PM
so, As a work around, i tried to create a blank pdf file and embedded those font, so that later i will just load that blank pdf file to faster the process.
here is the code i used to make the blank pdf:
intF1 = objPDF.AddTrueTypeFontFromFileEx(strAppPath & "\fonts\SutonnyMJ-Regular.ttf", 0) intF2 = objPDF.AddTrueTypeFontFromFileEx(strAppPath & "\fonts\SutonnyMJ-Bold.ttf", 0) intF3 = objPDF.AddTrueTypeFontFromFileEx(strAppPath & "\fonts\Modded.ttf", 0) objPDF.SaveToFile(strCurPath & "\Test.pdf")
|
and here is the code to load the pdf file and try to use the saved/embedded fonts:
objPDF.LoadFromFile(strCurPath & "\Test.pdf", "") objPDF.FindFonts() intF3 = objPDF.GetFontID(1) objPDF.SetHTMLNormalFont("Default", intF3) objPDF.DrawHTMLText(25, 25, 200, "100 $ 200 @ 300 ! 400 \") objPDF.SaveToFile(strCurPath & "\Output.pdf")
|
but unfortunately that didn't work.. when i tried to open that output.pdf file adobe shows a error and the printed text is garbage
so, now i am stuck and out of ideas :(
any help would be highly appreciated :)
|
Posted By: SalmaBegum
Date Posted: 06 Feb 19 at 1:07PM
Posted By: tfrost
Date Posted: 06 Feb 19 at 3:45PM
There were issues discussed in this forum last year with Bangla fonts (i do not recall if it was you who started them). I suggest you make up a small example of the problem and open a support ticket at https://www.debenu.com/support, because it will be outside the experience of most of the other users here (including me!).
|
Posted By: SalmaBegum
Date Posted: 06 Feb 19 at 3:55PM
tfrost wrote:
There were issues discussed in this forum last year with Bangla fonts (i do not recall if it was you who started them). I suggest you make up a small example of the problem and open a support ticket at https://www.debenu.com/support, because it will be outside the experience of most of the other users here (including me!). |
hi sir, greetings.. hope you are doing fine..
yes that was also me,
but i don't think it's related to font language/codding? as those font are not Unicode font.
any other idea/suggestion? please?
thanks in advance
|
Posted By: tfrost
Date Posted: 06 Feb 19 at 6:57PM
No, I have no other suggestion. I think that opening a support ticket is simple and is most likely to provide you with an answer. If the font is not a Unicode font then Foxit support should be able to tell you whether its encoding is supported.
|
|