wFlags = #PB_Window_SystemMenu | #PB_Window_ScreenCentered
OpenWindow(0, 0, 0, 400, 200, "Vector Printing", wFlags)
If DefaultPrinter() And
StartPrinting("Vector Printing") And
StartVectorDrawing(PrinterVectorOutput())
LoadFont(0, "Times New Roman", 20, #PB_Font_Bold)
VectorFont(FontID(0), 11)
VectorSourceColor(RGBA(255, 0, 0, 255))
MovePathCursor(50, 25)
DrawVectorText("PureBasic Vector Printing... ")
DrawVectorText("a sample printout.")
MovePathCursor(50, 100)
DrawVectorParagraph("More random text to test printing constraints...",
100, 100, #PB_VectorParagraph_Right)
StopVectorDrawing()
StopPrinting()
EndIf
While WaitWindowEvent() ! #PB_Event_CloseWindow : Wend
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!Please visit my YouTube Channel
Supplementary...
I think this may not be a PB issue, but what is going on here, and what can I do about it?
If I VectorOutput to PDF and then view the resulting file with a PDF viewer (Evince), it looks on screen just like the print on paper I get using VectorOutput to printer. But if I print the PDF file from the Viewer I get a tiny version of what I want in the middle of the paper. Scaled almost exactly 28%.
EDIT: Do about it? Answer is to Scale to fit printable area (option in Evince) which produces a print looking exactly like the print done directly from PB. Although it is not obvious to me why the PDF from PB does not have this size as its default.