CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Source printing? Export source to png?jpg?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
tcruise7771



Joined: 12 Apr 2013
Posts: 24

View user's profile Send private message

Source printing? Export source to png?jpg?
PostPosted: Thu Jun 20, 2013 8:43 am     Reply with quote

Hello i have program that i want to copy some of the fragments/parts of it into a .doc file and keeping the formatting and colors of the text. So far i have been doing such thing by making a print screen of the PIC C CCS window, but that takes too long time and it isnt very rational.
Is there some way for me to export the text with the formatting as a png/jpr or to a text file with formatting and colors ?

Thanks, and sorry if this question sounds noob.
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Thu Jun 20, 2013 9:21 am     Reply with quote

I'd probably try printing to a pdf file, assuming you have a 'virtual' printer that can support this setup. Make sure you tick the boxes 'syntax print', and 'print colours'. You can get it as an 'image' (but much bulkier), using ImagePrint as your output device.

Best Wishes
tcruise7771



Joined: 12 Apr 2013
Posts: 24

View user's profile Send private message

PostPosted: Thu Jun 20, 2013 1:32 pm     Reply with quote

Ttelmah, your advice led me to the idea of choosing Microsoft XPS Document Writer and all text is saved with the formatting and colors.
Weirdly all the virtual pdf printers i found reported some kind of suspicious adware or potentionally unwanted app, anyway the XPS file copies fine to a doc.

Thanks for always being helpfull.
jeremiah



Joined: 20 Jul 2010
Posts: 1346

View user's profile Send private message

PostPosted: Thu Jun 20, 2013 2:02 pm     Reply with quote

For pdf printing, I find cutepdf to be reliable, but you also need to install ghostscript for it to work (they provide a link on the webpage). No virus warnings from either AVG or Avast on my end.

One thing I do, is open the code in visual studio and copy/paste from there into word and that seems to work. There is a free version available at the microsoft website. It has a lot of limitations, but if all you need it is for grabbing text and copying, it is a fast way to do it as well. The downside to this method, is some CCS specific types/keyword don't always come out in color, but it hasn't been anything I cared a lot about.
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Thu Jun 20, 2013 2:25 pm     Reply with quote

One of my favorite tools for such things is "Snagit" by Techsmith. Very handy utility that allows you to grab any part of a screen etc and either save it as a file or simply paste it into something. No connection with them other than being a satisfied user for a number of years.

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Fri Jun 21, 2013 12:37 am     Reply with quote

Anyway, glad you got the output you needed. It is one of those 'not instinctively obvious' things in many applications, that the easiest way to get a reproduction of 'what you see, is to print to a virtual printer.
I've always had the Adobe pdf writer on systems, so no problems with adware. Smile

Best Wishes
tcruise7771



Joined: 12 Apr 2013
Posts: 24

View user's profile Send private message

PostPosted: Fri Jun 21, 2013 9:46 am     Reply with quote

From all the variants i found out the best was PDF. My initial idea was making too much mess of the document. The only problem of PDF is that for example #include <PIC16F877A.h> becomes < PIC16F877A . h >
Weirdly where the font is italic, for example // comments all is fine .... how great it had adition Word(with formatting) saving to all the cool tools it offers, thought i know value of such tool to the programmer is close to 0.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group