I have embedded the ActiveX into an ASP.NET page without issue. I can read from a local file and display the document. I want to be able to have my codebehind (.cs) methods obtain a PDF in a byte(), pass it back to the page via a hidden field or equivalent and then display that document within the Activex (from stream).
I've been able to store the byte[] array in an ASP hiddenfield but where I am struggling is with the code necessary to open a document from a stream. I do this using my "thick" C# client but I basically copied the example where you use the IStreamWrapper. I presume I'd have to do this using javascript but have no idea how to accomplish it.
Does this make sense? Is what I am trying to achieve possible?
Thanks,
Jon
Embed ActiveX in Browser (IE with ASP.NET)
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 12
- Joined: Thu Mar 26, 2009 1:01 pm
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Embed ActiveX in Browser (IE with ASP.NET)
Hello,
Viewer ActiveX is client side control, so you cannot access to this control for loading PDF's from server side code.
Viewer ActiveX is client side control, so you cannot access to this control for loading PDF's from server side code.
-
- User
- Posts: 12
- Joined: Thu Mar 26, 2009 1:01 pm
Re: Embed ActiveX in Browser (IE with ASP.NET)
Actually, I am not asking for that. JavaScript is client-side code that resides within the browser and is executed on the machine hosting Internet Explorer. What I am looking for is the ability to pass a PDF document (as a memorystream) into the ActiveX control from Javascript. So, for argument's sake, let's assume that the Javascript is able to get the PDF in a byte array form via an AJAX call. The JavaScript would then need to make an API call to the ActiveX control by displaying the document from memorystream rather than from a physical file location. This is all client-side functionality.
Thanks,
Jon
Thanks,
Jon
-
- User
- Posts: 664
- Joined: Tue Nov 14, 2006 12:23 pm
Re: Embed ActiveX in Browser (IE with ASP.NET)
Sorry, but we don't have specialists in ASP.NET code that can help you with such code.
However if you can get IStream in your JS code, then to open it, you can simply pass it to OpenDocument function of Viewer AX.
However if you can get IStream in your JS code, then to open it, you can simply pass it to OpenDocument function of Viewer AX.