How to use PDFViewCtrl.OperUrlAsync with a proxy and custom headers?

18 views
Skip to first unread message

Ryan

unread,
Oct 5, 2016, 4:59:58 PM10/5/16
to PDFTron PDFNet SDK
Question:

Due to security settings, we need network communication to use a Proxy, and also we need to include custom headers. Is this possible using OpenUrlAsync?

I found the following blog entry “Streaming a PDF From the Web to a Mobile or Desktop App” (https://blog.pdftron.com/2013/08/24/streaming-a-pdf-from-the-web/). But that did not cover this.

Answer:

In our latest version you can set custom headers.

As for proxy, if you are using the latest version of PDFNet, then it will pick up what the OS is set for.

We use WinHttp interface, so running one of the following to setup proxy, should work.

    The proxycfg.exe utility on Windows XP and Windows Server 2003 or earlier.
    The netsh.exe utility on Windows Vista and Windows Server 2008 or later.

for example, run command line as administrator and call

netsh winhttp set proxy a.b.c.d:x
Reply all
Reply to author
Forward
0 new messages