Ok, this is a bit of a tricky situation, and I am not sure if a asolution even exists. Basically, I have an ActiveX control which provides a link into a specific type of file. This control also has a COM object which I can implement in PHP.
One of the functions within the control actually renders a drawing from the file into the ActiveX Component. The function returns a success code in PHP, but I am unsure what it has drawn or where, since there is no actual output on the server side (web based, obviously).
Does anyone know of a way to define a workspace within PHP where rendered information can then be captured and put into a bitmap or printer object?
ActiveX Components?
Moderator: General Moderators
-
Stoneguard
- Forum Contributor
- Posts: 101
- Joined: Wed Aug 13, 2003 9:02 pm
- Location: USA
hmm.. I really dont know anything about how Bill Gates Web Servers do stuff, but as far as apache goes, unless specific (physical or pipe) file is mentioned all produced data goes to stdout (and/or stderr).. So if the Bill-Gates-Com/Active-X renders something that is not sent to stdout in an image format I dont think it belongs on a web server?
If it writes directly to videomem or some other buffer I guess you need to capture this buffer... I dont know what you are working on, but are you sure imlib and gd couldnt do the job?
If it writes directly to videomem or some other buffer I guess you need to capture this buffer... I dont know what you are working on, but are you sure imlib and gd couldnt do the job?
-
Stoneguard
- Forum Contributor
- Posts: 101
- Joined: Wed Aug 13, 2003 9:02 pm
- Location: USA
-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
-
Stoneguard
- Forum Contributor
- Posts: 101
- Joined: Wed Aug 13, 2003 9:02 pm
- Location: USA
Heh, I haven't even figured out exactly how to do it in ASP. I could write my own activeX control to print the rendered image to a file and then convert it to pdf, I think.
I like fractal's thoughts, so I am going to see if I can work with that, not sure if I will have any success though.
Thanks for the input, guys!
I like fractal's thoughts, so I am going to see if I can work with that, not sure if I will have any success though.
Thanks for the input, guys!
-
fractalvibes
- Forum Contributor
- Posts: 335
- Joined: Thu Sep 26, 2002 6:14 pm
- Location: Waco, Texas
With ASP there is no concept of stdout, really. stdout would be just the html page produced and any images, etc. What exactly does this COM component produce - i.e. it returns something - a jpg, a pdf, an excel file - something! I typically have a ASP script that serves as a media sever i.e.
<img src='MediaServer.asp?id=3564'>
but can be used for just about anything, so long as you know the content-type (MIME TYPE). Same principle should apply to PHP.
fv
<img src='MediaServer.asp?id=3564'>
but can be used for just about anything, so long as you know the content-type (MIME TYPE). Same principle should apply to PHP.
fv
-
Stoneguard
- Forum Contributor
- Posts: 101
- Joined: Wed Aug 13, 2003 9:02 pm
- Location: USA
My whole delimna is that the component is actually a Control, not a COM component. It can be called through the COM layer, but I believe it inherits from the PictureBox control.
Within VB itself, I have to set up a size for the control and the rendered image is sent directly to the Form on which the component sits. It does not ever return any type of stream with the image in it. The original owners of the code have locked it out tight from the security perspective so that you have to own a physical key (USB port adapter) to access each level of functions.
So, my thought was either to built my own wrapper around the control and try and somehow pull in the image info or to directly call the component and try and capture the rendering. I have not been successful yet and have pretty much set it aside to accomplish some more important things at the moment.
If you have any more suggestions or some code specifics, please let me know!
Within VB itself, I have to set up a size for the control and the rendered image is sent directly to the Form on which the component sits. It does not ever return any type of stream with the image in it. The original owners of the code have locked it out tight from the security perspective so that you have to own a physical key (USB port adapter) to access each level of functions.
So, my thought was either to built my own wrapper around the control and try and somehow pull in the image info or to directly call the component and try and capture the rendering. I have not been successful yet and have pretty much set it aside to accomplish some more important things at the moment.
If you have any more suggestions or some code specifics, please let me know!