Author Topic: Printing  (Read 12146 times)

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Printing
« on: October 04, 2006, 02:03:37 pm »
How does one set the number of lines per page? When I print the program, line 62 does not print as it appears to be too low on the page.

Is there a setting that might belong in the editor/margins setting?

Also, should there be a way of making the choices when printing (e.g. line numbers) sticky, so that it does not have to be reset each time you print?

Thanks.

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Re: Printing
« Reply #1 on: October 06, 2006, 07:33:17 pm »
Hi,

Since no one else seems to have raised this issue, I did some further research. Using a Windows XP system, depending on which printer you use, CodeBlocks seems to either:
1. obey the choice of paper (i.e. "letter") set on the printer preferences,
2. ignore it and use "A4" no matter what is set, or
3. obeys the setting of "letter" and then immediately sets it back to "A4".

Here are some results:
HP 970CXi - #2 above
LaserJet printers (4000 and 4050) - #3
Adobe Acrobat Driver followed by HP970 CXi - #1

Of course using the the wrong paper type results in a line or two not printing at the bottom of each page.

This seems like a bug.... :)

At Brooklyn College, we are planning to switch to the CodeBlocks IDE for our programming classes. We have prepared an (introductory) student manual, which will be ready soon. But I am concerned about the 'little' things that would confure and introdcutory student.

Anyway, all in all, this system is quite professional and my thanks to all!


sethjackson

  • Guest
Re: Printing
« Reply #2 on: October 06, 2006, 08:28:01 pm »
I think I know the culprit.

@The Devs

Look at InitPrinting().

http://www.wxwindows.org/manuals/2.6.3/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetpapersize
http://www.wxwindows.org/manuals/2.6.3/wx_wxprintdata.html#wxprintdatasetpaperid

Something like SetPaperSize(wxPAPER_LETTER) should work (I did this in my app).

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5490
Re: Printing
« Reply #3 on: October 06, 2006, 10:03:22 pm »
I think I know the culprit.

@The Devs

Look at InitPrinting().

http://www.wxwindows.org/manuals/2.6.3/wx_wxpagesetupdialogdata.html#wxpagesetupdialogdatasetpapersize
http://www.wxwindows.org/manuals/2.6.3/wx_wxprintdata.html#wxprintdatasetpaperid

Something like SetPaperSize(wxPAPER_LETTER) should work (I did this in my app).
just waiting on your patch Seth ;-)

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: Printing
« Reply #4 on: October 06, 2006, 10:17:00 pm »
just waiting on your patch Seth ;-)

Yeah Seth, where're the patches !!  :D
Times up. Put down that pencil !
What was you SAT score anyway?
Finish the patches first, then you can go drive you're Moms Hummer.

« Last Edit: October 06, 2006, 10:23:07 pm by Pecan »

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Re: Printing
« Reply #5 on: October 11, 2006, 03:19:19 pm »
Any chance one of you will actually fix this :)  Its still a problem in the latest build..... Here in the US we use 'letter' size paper and not A4, so its a real problem.

Thanks

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Printing
« Reply #6 on: October 11, 2006, 03:26:49 pm »
Its still a problem in the latest build..... Here in the US we use 'letter' size paper and not A4, so its a real problem.

you can use the Exporter Plugin, and print then the html file e.g.

btw. i never print source code - but i use A4 paper  :P

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Re: Printing
« Reply #7 on: October 11, 2006, 04:16:03 pm »
What I do is to print to Adobe pdf and then print the pdf, which works fine. But for students, that is a bit complicated.

And..... we do need them to print and turn in their assignments  :D

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Printing
« Reply #8 on: October 11, 2006, 04:23:31 pm »
what would be the suggested solution ?
any Setting which allows to select between A4 and Letter page sizes ? is this sufficient ?

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Re: Printing
« Reply #9 on: October 11, 2006, 04:47:34 pm »
Yes.

However, usually the paper size is set in the printer settings. When you print from CodeBlocks it brings up the standard windows printer dialogue (from which you set the paper). However, it seems that codeblocks then ignores the setting and sets it to A4 no matter what is set in windows. And, as I wrote earlier, it is not consistant from printer to printer. That's why I think (and of course I may be wrong) that it is a bug, not a lack of a feature :)

We should not need a separate setting in Codeblocks to set the papersize. Codeblocks should simply follow the windows setting.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Printing
« Reply #10 on: October 12, 2006, 01:57:52 pm »
should be corrected in svn rev 3078, please test it and give feedback
brgds, tiwag

sethjackson

  • Guest
Re: Printing
« Reply #11 on: October 13, 2006, 03:57:08 am »
just waiting on your patch Seth ;-)

Yeah Seth, where're the patches !!  :D
Times up. Put down that pencil !
What was you SAT score anyway?
Finish the patches first, then you can go drive you're Moms Hummer.



My SAT score ATM is 0. I haven't taken the test yet. :lol: :lol:

@Tiwag Your the man. :D
« Last Edit: October 13, 2006, 04:11:09 am by sethjackson »

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Re: Printing
« Reply #12 on: October 16, 2006, 06:17:59 pm »
should be corrected in svn rev 3078, please test it and give feedback
brgds, tiwag

1. It DOES remember the line number setting.

2. It does NOT use the default windows printer setting. However, if it is told to use letter paper it does, but reverts to A4 each time codeblocks is reloaded.

3. It no longer prints using the font size selected for the editor (as it did in previous builds). It now prints using (I believe) 8 points no matter what is set.

Thanks for your attention.

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Printing
« Reply #13 on: October 16, 2006, 08:25:57 pm »
1. It DOES remember the line number setting.
:)

2. It does NOT use the default windows printer setting. However, if it is told to use letter paper it does, but reverts to A4 each time codeblocks is reloaded.
this is a problem which i tried to solve, but i don't know how to address.
i didn't find a method to get default printer settings from current printer.
sorry - there is no intent to investigate further on this.  :(
if someone here knows how to solve this using wxWidgets, please let us know about.

3. It no longer prints using the font size selected for the editor (as it did in previous builds). It now prints using (I believe) 8 points no matter what is set.
when using Ctrl +/- it does only affect screen display size,
but you have to go to Settings->Editor and choose the editor's font size there, then it will be used for printout too.  :)
at least it does so on my WinXP using a pdf printer driver and on a Canon Laser Printer, so i assume it's working for others too.

brgds, tiwag
« Last Edit: October 16, 2006, 08:34:26 pm by tiwag »

Offline BCCISProf

  • Multiple posting newcomer
  • *
  • Posts: 60
    • Professor Langsam's Home Page
Re: Printing
« Reply #14 on: October 16, 2006, 09:40:12 pm »
OK. Fair enough.

Point 1 & 3 work as they are supposed to.

Point 2 is workable but not ideal :)

Thanks for your very quick fix on this!