Formatting Text File Output
#1
Question 
Not sure what I really can do as a report printer to file. Does QB64 have any functions that deal with formatting text to file? I poked around the board and the wiki and haven't really found anything. Any thoughts or leads? Ideally, I would like to center lines on a page (without having to manually space things), maybe some font or styles. Do we have any support for RTF (or PDF, if I may be bold Confused ) in QB64 itself or a library that we can use?

Any help would be appreciative, other than report output. The student database is up and running. It is time to start thinking about the gradebook side as well!

Thanks y'a11!
Reply
#2
Anything you can draw on screen you can printout using _PrintImage, you would actually want to draw and print text with or without color and fonts into an image container setup with 

imageHandel& = _NewImage(pageWidth, pageHeight, ColorMode)

that has same ratio or proportions as your target printed page with or without borders so image isn't distorted just magnified or shrunk to fit page. It doesn't even have to fit the screen.
b = b + ...
Reply
#3
(11-29-2022, 01:00 PM)bplus Wrote: Anything you can draw on screen you can printout using _PrintImage, you would actually want to draw and print text with or without color and fonts into an image container setup with 

imageHandel& = _NewImage(pageWidth, pageHeight, ColorMode)

that has same ratio or proportions as your target printed page with or without borders so image isn't distorted just magnified or shrunk to fit page. It doesn't even have to fit the screen.

Never thought about printing out pictures.... That could be a great idea. Now if I can learn to draw haha. Thanks! I will have to play with it. Big Grin
Reply
#4
So, the report printer is coming along nicely for my gradebook that is more a student management system at the moment.

I do have a question following up with _printimage, is there way to produce a print out with two or more pages with _printimage. Trying to make it more user friendly for those reports that will be over one page instead of prompting every time.... If not, perhaps I have to rethink somethings....

Up to 1200 lines now  Big Grin (whole program, not just _printimage)
Reply
#5
Are you using Windows or Linux?
Ask me about Windows API and maybe some Linux stuff
Reply
#6
RTF is my middle name...

https://qb64forum.alephc.xyz/index.php?t...#msg130139

Pete
Reply
#7
(12-08-2022, 09:45 PM)Spriggsy Wrote: Are you using Windows or Linux?

Using windows
Reply
#8
(12-08-2022, 11:01 PM)Pete Wrote: RTF is my middle name...

https://qb64forum.alephc.xyz/index.php?t...#msg130139

Pete

I'll have to dig more into RTF but it could be an option and I guess this would be good for our Mac users out there as well  Big Grin
Reply




Users browsing this thread: 6 Guest(s)