User forums > Help
code printout in Linux is poor
agajania:
When using Code::Blocks in Linux, the Print.. option produces a poor printout of the source code in the editor.
A bug report for this problem has been filed. It can be found at http://developer.berlios.de/bugs/?func=detailbug&bug_id=17990&group_id=5358.
MortenMacFly:
--- Quote from: agajania on March 09, 2011, 11:17:27 pm ---http://developer.berlios.de/bugs/?func=detailbug&bug_id=17990&group_id=5358.
--- End quote ---
To my knowledge scintilla has no print API. We use wxWidgets for printing. Hence I believe you didn't use the "source exporter" plugin. It is there to create pretty print documents out of source code which should solve your issue.
agajania:
--- Quote from: MortenMacFly on March 10, 2011, 06:34:28 am ---To my knowledge scintilla has no print API. We use wxWidgets for printing. Hence I believe you didn't use the "source exporter" plugin. It is there to create pretty print documents out of source code which should solve your issue.
--- End quote ---
Thank you for your reply.
Scintilla's print API is documented at http://www.scintilla.org/ScintillaDoc.html#Printing.
I haven't gone through Code::Blocks source code to determine the code paths for printing. However, when I select the Print... option in the File Menu, a Print... dialog comes up with options that are similar to the options in the Scintilla printing function SCI_SETPRINTCOLOURMODE(int mode).
I have two issues with the source exporter plugin. First, it doesn't format well code that has been indented with tab characters. Second, after you export source code to a file, you have to find another way to print that file. This extra step is OK for me, but it is best to keep things simple for students who are learning programming.
Ceniza:
--- Quote from: agajania on March 10, 2011, 04:17:15 pm ---I have two issues with the source exporter plugin. First, it doesn't format well code that has been indented with tab characters. ...
--- End quote ---
I just did a quick check, and you are right. Replacing tab with the remaining number of spaces needed to match the settings should do the trick. I was completely unaware of that issue (I do not use tabs to start with, so that little detail went unnoticed).
[edit]
Fixed :D
It should be available in the next nightly.
[/edit]
MortenMacFly:
--- Quote from: Ceniza on March 10, 2011, 06:10:26 pm ---I just did a quick check, and you are right.
--- End quote ---
Oh - I understood this completely different. Good to know you took care.
While we are at it: I've a patch pending that completely updates the source exporter plugin to a recent wxPDFDoc. I didn't commit so far because of missing linux build support. Shall we do this together in a branch (e.g. wxSmith)?
Navigation
[0] Message Index
[#] Next page
Go to full version