| View previous topic :: View next topic |
| Author |
Message |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Fri Jun 11, 2004 2:11 pm Post subject: If there's a dll developer with some spare time.. check this |
|
|
Hello,
I was wondering if any of the vds dll developers has some spare time, and could turn this code into a simple vds dll:
| Code: |
var
Info: PBitmapInfo;
InfoSize: DWORD;
Image: Pointer;
ImageSize: DWORD;
Bits: HBITMAP;
DIBWidth, DIBHeight: LongInt;
begin
Printer.BeginDoc;
try
Canvas.Lock;
try
{ Paint bitmap to the printer }
with Printer do
begin
Bits := bmp.Handle;
GetDIBSizes(Bits, InfoSize, ImageSize);
Info := AllocMem(InfoSize);
try
Image := AllocMem(ImageSize);
try
GetDIB(Bits, 0, Info^, Image^);
with Info^.bmiHeader do
begin
DIBWidth := biWidth;
DIBHeight := biHeight;
end;
StretchDIBits(Canvas.Handle, 0, 0, DIBWidth, DIBHeight, 0, 0,
DIBWidth, DIBHeight, Image, Info^, DIB_RGB_COLORS, SRCCOPY);
finally
FreeMem(Image, ImageSize);
end;
finally
FreeMem(Info, InfoSize);
end;
end;
finally
Canvas.Unlock;
end;
finally
Printer.EndDoc;
end;
end; |
Source: http://www.scalabium.com/faq/dct0090.htm
This dll must print the bitmap to the default printer without any interference of Windows, and must also stretch the over the whole paper (A4, the normal paper size), because the size of the bitmap depends on the screen resolution of the computer, and my bitmaps need to cover the whole paper.
You can download an example bitmap (with barcodes) here: http://vic.vdsworld.com/dump/barcodes.zip
Tommy was creating such a print dll for me, but somehow it prints an empty paper at a Lexmark laser printer, and I don't feel comfortable bothering him for every tiny thing, especially because he's so busy with school
I'm almost sure that it has something to do with way of printing he's using in his dll.... have a look at this quote:
| http://www.scalabium.com/faq/dct0090.htm wrote: | | But this code will work correctly not with any printer! For example, Epson Stylus 300 this code will print the image with very bad quality and on some printer you can receive a blank paper... The reason of this - using the StretchBlt function for output but in MSDN you can read that this function does not guarantee a correct outputing from one device to other. |
I cannot use the 'shell print' command, because then my end-users would have to hit OK about 500 times to get all 500 pages printed.
Thanks in advance,
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Jun 14, 2004 1:23 pm Post subject: |
|
|
Hi Vic,
The new version of Gadget already has this ability built in Also the new version of Gadget has the ability to print your VDS Dialog like a form and other things directly to the default printer. I am working on the examples for this currently. _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Mon Jun 14, 2004 3:14 pm Post subject: |
|
|
I hardly can wait till it's finished
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jun 14, 2004 6:48 pm Post subject: |
|
|
Can we still buy it at the low price now and get the update when it comes out?  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
vdsalchemist Admin Team

Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Mon Jun 14, 2004 7:31 pm Post subject: |
|
|
| FreezingFire wrote: | Can we still buy it at the low price now and get the update when it comes out?  |
Yes but you better hurry I will put some temporary links so people who want to buy the beta may do so. Because once the final is released that price will be no longer.
Now I am not saying that I will be charging some crazy price for the final but I will be charging what I think would be fair for what it has taken to put this all together.
The reason this DLL has taken so long is because I wanted VDS to have many of the same abilities that most other languages already have. Where the other languages usually have the advantage of multiple programmers working on it I am only one so please be patient. Also for the most part my programming skills are not that great and it takes a lot of trial and error to get this stuff right. Did I mention that I was really really slow at programming  _________________ Home of
Give VDS a new purpose!
 |
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Jul 05, 2004 5:32 am Post subject: |
|
|
Vic,
Please tell me if the DLL I released will do or if I would have to update it with the
code you posted in this topic.
Tommy |
|
| Back to top |
|
 |
|