Hi Umberto,
It looks like our task is to create a wrapper/container based on PCL5/6 to use as the printer envelope.
Reading the Wiki on HP ePrint, it appears that this is how the ePrint system works.
http://en.wikipedia.org/wiki/HP_ePrint
There is a diagram that shows the Cloud (Print) Server encapsulating the files sent to it in PCL which is in turn sent to the printer.
Actually, the cloud printer checks it's email box for print jobs and then request the job from the server.
We don't need to recreate this entire system, but I think we are stuck with the part of encapsulating the data.
PCL to me, anyway, seems like it is what the printer is expecting. It lays out the header if there is one, same with the footer and other metrics of the print job including the Type of data (Text, PDF, HTML,JPG(Images), RTF) and so forth.
Using what seems to be a basic set of layout commands, we could put together some Letter/Portrait and Letter/Landscape settings as a starting point.
My intention is to create a basic layout (class) ?? for text using Letter/Portrait with a 1/2" margin all the way around, no header/footer and see if I can get the printer to print.
For now we will use a Code Module.
There are PCL codes to request feed back, which I will try to incorporate as well.
It will take a bit, but I will start this basic setup and post.
I've never had to work with reading and writing files using Asyncstreams (where all the data has to be binary(Byte)).
I did find where Erel had posted a response to use
Dim buffer() As Byte = Bit.InputStreamToBytes(File.OpenInput(File.DirAssets, "testfile.txt"))
The point being, it would be nice if we could write the PCL commands as a text file like they can on a PC/MAC.
The difficulty comes with using the actual Escape character, Chr(27), 0x1b mixed in with the string ascii characters, but I'll find a way.
I realize I haven't posted any code yet, but I will.
I deliver stuff all over the Eastern US in a small truck, so I have to manage my time.
Off to pick up some freight, will post later,
Mark