Posted 19 years ago by painetraine
Avatar
Is there a way to print the selected text using the SyntaxEditor.Print instead of the entire document text?

Thanks

Comments (12)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
There isn't a way right now however I'll add it to the TODO list.


Actipro Software Support

Posted 19 years ago by Marianne
Avatar
Any word on when this will be included? Thanks.

------------------------------- Marianne

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Marianne,

I've looked at it and the way we have things set up, this isn't a straightforward thing to implement. But I will try and bump it up on the priority list to see if we can get it in soon.


Actipro Software Support

Posted 19 years ago by Boyd - Sr. Software Developer, Patterson Consulting, LLC
Avatar
As a workaround, would it be possible to load the selected text into a new instance of SyntaxEditor and initiate the print from there? You could even adjust the starting line number used by that instance of Syntax Editor to make sure they line up with the original.

Just a thought...
Posted 19 years ago by Marianne
Avatar
What about this... can you set up the print output so that it captures the display from the editor and not the complete script. In other words, if I have collapsed regions, I want them to stay collapsed in the print output. Right now, it automatically prints the fully expanded version of the script.

Boyd, the workaround is definitely worth looking into. Thanks.

------------------------------- Marianne

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'll add this to the TODO list. It should be easy to add a property to control whether all collapsed nodes are auto-expanded or not in printing.


Actipro Software Support

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The printing selection option has been added for the next maintenance release.


Actipro Software Support

Posted 8 years ago by Mark Cunningham - Software Engineer, CNC Software, Inc.
Avatar

Can you post a starting point for print selection?

Mark Cunningham

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mark,

If the editor.PrintSettings.PrintDocument.PrinterSettings.PrintRange == PrintRange.Selection then it will print selection.


Actipro Software Support

Posted 8 years ago by Mark Cunningham - Software Engineer, CNC Software, Inc.
Avatar

I'm using the ActiproSoftware.SyntaxEditor.Wpf.dll assembly, and the PrintDocument and PrintRange don't resolve.  I can't find either keyword in the help or sample application solutoin.  What am I missing?

Thanks.

Mark Cunningham

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mark,

This forum thread is for the WinForms SyntaxEditor, so that reply was related to that version.

The WPF version doesn't currently support printing only a selection, mainly because there is no option for us to interact with in .NET 4.0.  I believe Microsoft added an option in .NET 4.5 that allowed the print selection option, but our code still targets .NET 4.0 so we can't work with that yet.  You'd probably have to follow Boyd's suggestion above for now on that platform.


Actipro Software Support

Posted 8 years ago by Mark Cunningham - Software Engineer, CNC Software, Inc.
Avatar

Ok, that's for this, sorry about posting in the wrong forum. Our code already did the workaround but I noticed that the fonts/colors don't come through. So more work around work todo.

Thanks.

Mark Cunningham

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.