Whilst it is true that pdflib won't work fully in BBC BASIC for Windows, if you are using only FN_PLhardcopy (which I believe is what the OP is doing) it does appear to run without error, and generates a valid PDF file. The only thing wrong seems to be that the resulting PDF has an incorrect aspect ratio (it is 'stretched'), exactly as the OP has reported.No, pdflib wont work with BB4W, it's intended for BBCSDL since there is no printer support in SDL.
In fact I suspect that this is indeed a bug in pdflib, because if I run pdfdemo.bbc in BBC BASIC for SDL 2.0, but delete the lines which set the initial window size, that too generates a PDF with the wrong aspect ratio! So I'm suspicious that FN_PLhardcopy() is misbehaving in not preserving the aspect ratio.
My understanding was that FN_PLhardcopy() is designed to work like *HARDCOPY in BB4W (with no parameters), which by default centres the window on the printed page rather than stretching it. If you want stretching you can achieve that by specifying the parameters explicitly.
Indeed. The code to create a PDF version of what's displayed in BB4W is extremely simple:Or (as i found out today) simply use the inbuilt 'Microsoft Print to PDF'.
Code: Select all
*PRINTER Microsoft Print to PDF
*HARDCOPY
VDU 2,1,12,3