PDFTron setCustomFontURL with fonts rendered over HTTP

39 views
Skip to first unread message

Yuri Baburov

unread,
Dec 14, 2020, 11:30:57 AM12/14/20
to PDFTron SDK
I want to make PDFTron to render fonts from localhost, I set setCustomFontURL to 'HTTP://localhost/fonts/' .
It downloads HTTP://localhost/fonts/fonts.json , but then it tries to download fonts from HTTPS://localhost/fonts/LiberationSerif.ttf.lzma etc. But I want HTTP not HTTPS.
How to fix this behaviour?

Ryan Barr

unread,
Dec 14, 2020, 5:22:31 PM12/14/20
to pdfne...@googlegroups.com
​Could you elaborate on why HTTP is important for you? Why not use HTTPS?
Why is localhost important?
Is all this just for evaluation purposes? Or is using HTTP how you want to go into production?

18796:789536

Yuri Baburov

unread,
Dec 16, 2020, 8:30:39 AM12/16/20
to PDFTron SDK
1) I have an intranet machine, it has no internet connection, so we can't download fonts from pdftron.com/fonts/ .
2) Without internet, the only kind of HTTPS setup is with a self-signed domain certificate (which displays red errors, and is blocked by browsers unless clicked on "proceed to the site").

So we have a HTTP version of the site, with the fonts loading locally.



--
You received this message because you are subscribed to the "PDFTron PDFNet SDK" group (http://www.pdftron.com/pdfnet/forum.html).
---
You received this message because you are subscribed to the Google Groups "PDFTron SDK" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfnet-sdk+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfnet-sdk/5fd7e59e2d8b5_2592aebd69dc35c1267459a.sidekiq-frequent-fd-poduseast1-main3-blue-58bf755745-9msjw%40email.freshdesk.com.


--
Best regards, Yuri V. Baburov, Skype: yuri.baburov

Yuri Baburov

unread,
Dec 16, 2020, 8:33:15 AM12/16/20
to PDFTron SDK
I consider the only change in the SDK would be to use the same protocol from fonts.json for the font files, instead of automatically prepending "HTTPS://" to them, because the fonts.json file is loading fine if it's served from HTTP .

Ryan

unread,
Jan 26, 2021, 7:13:28 PM1/26/21
to PDFTron SDK
Sorry for the long delay in an update.

> I have an intranet machine, it has no internet connection,
Will this be your setup for "production"? Or just a restriction you are under during testing/evaluation?

If it is your production setup, can you elaborate on the scenario more (if you need to, you can reach out to us using our ticket forms if you need confidentiality.

Essentially there are technical reasons its setup to be HTTPS always, so we would need to know more about your requirements before we could investigate/commit further on allowing HTTP.

In the meantime, so you can continue evaluation without internet, is you could use the "file://" protocol instead, that will load the fonts using "file://"

Reply all
Reply to author
Forward
0 new messages