Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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.
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
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?
The noticing will continue
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


Possibly Related Threads…
Thread Author Replies Views Last Post
  Make IDE $Console:Only output readably large dakra137 1 526 10-10-2025, 12:21 PM
Last Post: hsiangch_ong
  Inputting output from other languages Helium5793 8 1,260 05-30-2025, 12:30 PM
Last Post: Helium5793
  why am I not seeing my _printstring output? Cobalt 2 638 05-19-2025, 05:54 PM
Last Post: Cobalt
  Scrolling Output That Exceeds Screen Size Tim 17 3,298 04-19-2024, 07:22 PM
Last Post: Kernelpanic
  How can I create a search file for text? PhilOfPerth 5 963 01-26-2024, 12:41 AM
Last Post: bplus

Forum Jump:


Users browsing this thread: 1 Guest(s)