QB64 Phoenix Edition
Formatting Text File Output - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10)
+---- Thread: Formatting Text File Output (/showthread.php?tid=1202)



Formatting Text File Output - NasaCow - 11-29-2022

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!


RE: Formatting Text File Output - bplus - 11-29-2022

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.


RE: Formatting Text File Output - NasaCow - 11-29-2022

(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


RE: Formatting Text File Output - NasaCow - 12-08-2022

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)


RE: Formatting Text File Output - SpriggsySpriggs - 12-08-2022

Are you using Windows or Linux?


RE: Formatting Text File Output - Pete - 12-08-2022

RTF is my middle name...

https://qb64forum.alephc.xyz/index.php?topic=3553.msg130139#msg130139

Pete


RE: Formatting Text File Output - NasaCow - 12-08-2022

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

Using windows


RE: Formatting Text File Output - NasaCow - 12-08-2022

(12-08-2022, 11:01 PM)Pete Wrote: RTF is my middle name...

https://qb64forum.alephc.xyz/index.php?topic=3553.msg130139#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