![]() |
|
|||||||
| SDK ( DLL or ActiveX) Integrate PDF functions into your application easily. The SDK shares the same technology that powers Foxit Reader. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I'm using Foxit Reader ActiveX in my c# (vs2005) application. After loading the pdf file into the byte array (I had to do the loading myself, because the file content is encrypted) I thought I would just create a c# MemoryStream and pass it to the Foxit OpenStream method. Unfortunately it seems that OpenStream method expects me to pass some IStream interface and I have no clue how to convert my byte[] array (or MemoryStream) to IStream. I will be grateful for any tips. Best regards, Jacek |
|
#2
|
|||
|
|||
|
Hi again,
OK, I solved my problem using OpenCustomFile. In case someone faces the same problem, here is the solution (c# pseudocode): public class MyControl { // array of bytes containing the document private byte[] documentArray = null; public void Load(string path) { // 1. load the document to this.documentArray // 2. use OpenCustomFile this.axFoxitReaderSDK1.OpenCustomFile("") } // the two following methods are registered as event handlers in foxit control private void axFoxitReaderSDK1_CustomFileGetSize(object sender, AxSDK_AXLib._DFoxitReaderSDKEvents_CustomFileGetSi zeEvent e) { e.size = this.documentArray.Length; } private void axFoxitReaderSDK1_CustomFileGetBlock(object sender, AxSDK_AXLib._DFoxitReaderSDKEvents_CustomFileGetBl ockEvent e) { Marshal.Copy(this.documentArray, e.pos, (IntPtr)e.pBuf, e.size); } } Best regards, Jacek |
|
#3
|
|||
|
|||
|
Hi i am new to foxit reader and i need to develop a window application ( C#) .NET in which i can display pdf files using foxit.
Can u please send me a SAMPLE C# CODE displaying an image and if possible how to customize it thanks in advance |
|
#4
|
|||
|
|||
|
i figured it out...
download latest sdk version and u get a foxit reader sdk control on ur toolbar from the com components(.net) and u can also refer too http://www.foxitsoftware.com/foxitre...eX20_guide.pdf |
|
#5
|
|||
|
|||
|
Hi,
I have seen that openstream and a few related commands. But.....what is it used for? It has something to do with loading a pdf in memory but then what? Can someone explain what is the practical use of these functions? Thanks in advance for the explanation! D.R. Reijgwart |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|