Author |
Topic: Hard Copy Printing/Printing to PDF (Read 374 times) |
|
RNBW
Full Member
member is offline
Gender:
Posts: 106
|
|
Hard Copy Printing/Printing to PDF
« Thread started on: Apr 16th, 2015, 11:12am » |
|
This is another reason to use LBB rather than LB!
When I am developing a program that will require to print to a printer, I don't want to waste lots of paper checking the output, so I print to a PDF writer.
Unfortunately, when naming a PDF writer in the program LB completely ignores it and uses the default printer. This is also the case if you name another printer. It still defaults to the default.
There is a work around, using code produced by Robert McAllister (robmcal), which provides an alternative printer dialog to the standard Windows printer dialog.
Unfortunately, this means that you have to insert a lot of code into your program because LB doesn't support libraries or include code.
Naming the PDF writer in LBB works just fine, as it should. Another bug in LB - I'm sure I'm not the first to find it.
|
|
Logged
|
|
|
|
tsh73
Full Member
member is offline
Gender:
Posts: 210
|
|
Re: Hard Copy Printing/Printing to PDF
« Reply #1 on: Apr 16th, 2015, 12:20pm » |
|
Well, it really depends how much real hardcopy printing you do. I had default printer set to virtual one for as much time I knew there is "virtual printer". Zero lines programming saves from " lots of paper checking the output"
|
|
Logged
|
|
|
|
Richard Russell
Administrator
member is offline
Posts: 1348
|
|
Re: Hard Copy Printing/Printing to PDF
« Reply #2 on: Apr 16th, 2015, 1:27pm » |
|
on Apr 16th, 2015, 11:12am, RNBW wrote:LB completely ignores it and uses the default printer. |
|
This is well known and documented:
https://libertybasicbugs.wikispaces.com/PRINTERDIALOG-broken+for+XP+and+higher
Not only is the PRINTERDIALOG fixed in LBB, but you can also change the printer directly by assigning its name to the PrinterName$ variable. In addition, that allows you to pre-select which printer you want the PRINTERDIALOG to choose by default.
Somebody reported that the PrintCopies variable was not being set as they expected. This is normal for Windows - if the printer driver has a built-in capability for printing multiple copies (and many do) PrintCopies will always be set to 1. Only if the printer driver cannot do it automatically will PrintCopies be set, meaning that your program should output that number of copies itself.
Quote:Another bug in LB - I'm sure I'm not the first to find it. |
|
LB has a large number of bugs, both documented and undocumented, and new ones are regularly discovered. Carl seems unwilling or unable to fix many of them, possibly because they are caused by features of SmallTalk over which he has no control.
I'm not currently aware of any bugs in LBB (although of course what is a 'bug' and what an 'incompatibility' is open to interpretation).
Richard.
|
|
Logged
|
|
|
|
|