Re-upload because Github was changing CRLF line endings to LF causing the demo resource file not to compile properly with GoRC. I simply changed the .gitattributes and re-uploaded the resource file. The demo should compile correctly now.
https://github.com/PaulSquires/CPrintPreview/releases
Hi Paul
Wonderful stuff.
The barcodes works as a font.
I changed the section of business name into a barcode and it works.
Barcode.PNG
Now i just need a THOROUGH read of the documentation, but this will do jsut fine for my purposes!
Great Stuff
Peter
Hi Paul,
Internet was down at work yesterday, so I had time time to play with CPrintPreview, and yes!
1. Minor bug: when I set the Zoom level to a percentage, the horizontal scroll in the preview didn't work. It flickers a bit, but doesn't move. Windows 11, in case that matters.
2. Minor bug, I think: If I try to print twice with the same preview dialog, it hangs. The printer dialog doesn't appear until after the preview is canceled.
3. NBD: I added CPrintPreview to a Designer program, and I got 2 complaints about UNICODE being multiply defined. So I changed
#define UNICODE
for
#ifndef UNICODE
#define UNICODE
#endif
4. In the WriteTextBox function, I took out the DT_SINGLELINE flag so I could choose things like this:
ThreeBox.png
and it worked like a charm!
Awesome, thanks guys for the reports. I will make some tweaks today to the code. :)
Hi Paul,
When I run the demo, some fields seem to be oversized. I am running Win 10 Pro versionPrint Preview Demo.png 22H2
Grumble.
When I got home, I ran the demo on my (Win 10 Pro) laptop, and it didn't have the "no print twice" problem.
Then I copied it to my Win 11 computer, which uses a TV for a monitor, and it does have the "no print twice" problem. So it seems to be a Windows 11 thing.
When the demo runs on the TV (1366 x 768, big screen), it shows the same scrunching that Dennis reported. Maybe it's a Low DPI effect?
I do have my display set to 200%.
Dennis
My display is at 250% (4K laptop panel). Not sure (yet) why you guys are getting the skewed fonts.
My display is a 32" 4K. I should note that the printed demo invoice is identical to the displayed version. I print without any scaling (100%).
Hi All
I am still very new to cprintpreview and going to attempt something I am not sure if it can be done.
If I create a barcode with ZINT, it places a PNG on the drive.
Can we use cprintpreview to print that barcode?
I dont have the vaguest idea how one would do that.
Also, (Paul knows what i am busy with), I wonder if its practically fast enough to create a loop that create a barcode in zint, upload and print it and repeat to bulk print labels, each with unique barcodes?
(Isn't this going to be resource heavy or memory problematic?)
I am going to print stacks of 1000+ at a time.
Guidance would be most welcome.
-Peter
The cprintpreview class does not handle images yet.
I can't answer your second question because that is something that would have to be actually benchmarked on your hardware and computer. In theory, I wouldn't say that it would be overly resource intensive.
I imagine that I could write some simple FreeBasic code to print a PNG image to a printer. I would just use GDI+ to load it and then print it using regular win32 API calls.
Hi Paul
Lets wait and see what happens.
I am getting the strange feeling I have been played again.
For now, my little app works, and if or when I actually see an industrial printer makes its appearance, I could spend more time and effort on this project.
Your help so far made many things possible.
I am very grateful.
Kind regards,
Peter