Print Xojo source code in colour

Hi,

I provide source code printing applications. Over the past 10 years we have developed source code printing apps for VB, VBA and .NET. You can view the output generated on our website . Here is an example of output:

Questions:

  1. Do you think that there is a need for an app/script to print the source code in colour for XoJo applications?
  2. Has anyone got an example to iterate though all the projects items in a project?

Regards,
Owner
Joginder Nahil
www.starprinttools.com

There is already a print in colour solution built-in Xojo.

Thank you Emile.

Can you print the source code for the whole project?

Regards,
Joginder

I think the existing source code print thing is a bit weird to use and it doesn’t obey the color settings you have set for your Editor.
All classes, methods etc has to be selected to be printed. Could be done better :slight_smile:

Hi Albin,

I am new to Xojo and I may be wrong but I agree with you. I can export the source code to PDF but it has no line numbers, colour, page headers/footers, Table of Contents etc. May be there is a way and I do not know it.

I am trying to get some feedback from XoJo users if there is requirement to generate an electronic copy of the source code in colour with line numbers, and TOC, custom page headers/footer etc. The output can be saved to RTF and/or PDF with bookmarks to each project item and/or procedures and properties and functions.

Regards,
Joginder
www.starprinttools.com

I would be interested to try it out at least.
Line numbers/header/footer and a table of content is never wrong :slight_smile:
Don’t think that exists in Xojo right now.

Hi Albin,

Thank you for your feedback.

Do you know the answer to my 2nd question?

How to iterate though all the projects items in a project?

Regards,
Joginder
www.starprinttools.com

[quote=65809:@Joginder Nahil]Do you know the answer to my 2nd question?
How to iterate though all the projects items in a project?
[/quote]
Nope, sorry.

Well,

I am certainly interested in color source printing capabilities. I am not quit happy with the built in feature which is sort of rudimentary.

I think that if you want to print all the source your starting point is a saved project file, either plain text or xml. I think the latter is more easy to parse.

I just tried it and it’s realy easy:

  1. Menu Edit ->Options->Printing select Print in Color
  2. in the navigator select the item at the top and hold the shift key and the select the lowest item in the navigator
  3. Menu File->Print and select the printer and select the printersettings you want and click print

In my testing i got the whole project printed in color.

Andre,
Yepp but you can’t customize the colors printed. I for one do not like the default color scheme.
And no line numbers or header/footer/table of content witch could be useful :slight_smile:

Albin, It prints in the same colors as you have set in the options for the cod editor.
It has headers per Navigator item and subheaders per part of the item.

You are right, unfortunately no line numbers and no table of content.

Look at that, you’re right it actually does :slight_smile:

Hi Guys,

As I said, I have Windows Apps to print the source code in color for VB, VBA and .NET applications. In order to evaluate if my existing apps can handle Xojo source code, I used copy/paste to paste the source code from a Xojo app to my app. The only change that I made to the source code was to change comments lines from // to ‘

The following pdf file is the source code exported to PDF with book marks and a coversheet.

http://www.starprinttools.com/xojo/8queens.pdf

Now, I am happy that I can print the Xojo source code with my existing printing engine. This solution only will work, for the time being, for Windows users. I need to do further research to integrate it with Xojo IDE.

Do you think that there is a market for such a source code printing app?

Regards,
Joginder Nahil
www.starprinttools.com

I would certainly appreciate if you start a project to support xojo in your app.
If you do so, I would recommend to start with importing xojo projects, maybe first the text form for version control and later the binary form.

It does not have line numbers either in the code editor…

To get the whole project code (I do not have checked entry per entry, but I think so) in a PDF:
Choose every entry in the Navigation pane and cmd-p / ctrl-p and you got all, in colors. I even got a screen shot of Window1. Just do it.

Yes, to make the text wrap-around (line feed), one space is inserted (even in the moddle of a word) before the wrap-around.

TextArea1.SelText = "Window’s Parent title: " + TBar.Window.Title + EndOfLine + E ndOfLine

In the line above, “ndOfLine” appears in the next line. What you can read is a Copy / Paste from Preview / OS X 10.8.5.

OK: you may want to get more things, more controls, more (I do not know what more), but we have an essential part of the project here.

[quote=65807:@Joginder Nahil]Hi Albin,

I am new to Xojo and I may be wrong but I agree with you. I can export the source code to PDF but it has no line numbers, colour, page headers/footers, Table of Contents etc. May be there is a way and I do not know it.

I am trying to get some feedback from XoJo users if there is requirement to generate an electronic copy of the source code in colour with line numbers, and TOC, custom page headers/footer etc. The output can be saved to RTF and/or PDF with bookmarks to each project item and/or procedures and properties and functions.

Regards,
Joginder
www.starprinttools.com[/quote]
Albin: there is a Page Number, centered.

Joginder: that is not “Print Xojo source code in colour”.

What you are asking is Print a report on my Project. Good idea even if I do not know what this can add for me as a developer.

To read the project file:

there was - once a long ago - a file documenting the xml file structure (save your project as xml and work with that).

A quick search shows me that my choose of words for the request was wrong: I do not found it.

No.