Page 1 of 2 12 LastLast
Results 1 to 16 of 17

Thread: Printing out HTML & PHP on paper, but colour coded

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre

    Printing out HTML & PHP on paper, but colour coded

    Basicly I have to make a website for my coursework at school, but since I've been doing it over the summer holidays and not in school, I'm going to print the source out along with the rendered page. I can print the code out ok, but it's easier to read when it's colour coded (you know how it looks in Macromedia Dreamweaver?).

    So does anyone know of any free software to print this out in colour? This is HTML AND PHP.

    Thanks.

  2. #2
    Hexus.net Troll Dougal's Avatar
    Join Date
    Jun 2005
    Location
    In your eyeball.
    Posts
    2,750
    Thanks
    0
    Thanked
    0 times in 0 posts
    Linux is your fwiend.

    The standard editor in Linux lets you colour code and mark about 15 different languages iirc.

    Worked fine for C++
    Quote Originally Posted by Errr...me
    I MSN offline people
    6014 3DMk 05

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    Yes.......... but does it PRINT it out coloured?

  4. #4
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts

  5. #5
    TiG
    TiG is offline
    Walk a mile in other peoples shoes...
    Join Date
    Jul 2003
    Location
    Questioning it all
    Posts
    6,213
    Thanks
    45
    Thanked
    48 times in 43 posts
    Editplus2 does. Very good for the languages i use. XML, VXML, SQL, VB, C++, and various other specific telephony ones i use.

    Good minds think alike Iain
    -- Hexus Meets Rock! --

  6. #6
    Hexus.net Troll Dougal's Avatar
    Join Date
    Jun 2005
    Location
    In your eyeball.
    Posts
    2,750
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by XA04
    Yes.......... but does it PRINT it out coloured?
    YES

    Otherwise I wouldn't have reccomended it
    Quote Originally Posted by Errr...me
    I MSN offline people
    6014 3DMk 05

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    Rightio, thanks guys.

    Dougal: OK, thanks. I'll be using editplus though because I don't have Linux installed right now, but will keep it in mind for the future, thanks again .

  8. #8
    Member
    Join Date
    Aug 2005
    Location
    Coventry, UK
    Posts
    54
    Thanks
    0
    Thanked
    0 times in 0 posts
    For PHP code, take a look at http://uk2.php.net/manual/en/functio...light-file.php - just stick a file on your webspace named highlight.php containing:
    Code:
    <?php
    highlight_file($_GET['file']);
    ?>
    then you can call to it with http://YOURWEBSPACE/highlight.php?file=xxxx and it'll give you a pretty formatted coloured output you can just print straight from your browser.
    HTH.

  9. #9
    Registered+
    Join Date
    Aug 2005
    Posts
    19
    Thanks
    0
    Thanked
    0 times in 0 posts
    You could use emacs for windows which provides syntax highlighting for just about any programming/development language. Plus it has a huge support community.

    http://www.gnu.org/software/emacs/emacs.html

  10. #10
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    Quote Originally Posted by seanblee
    For PHP code, take a look at http://uk2.php.net/manual/en/functio...light-file.php - just stick a file on your webspace named highlight.php containing:
    Code:
    <?php
    highlight_file($_GET['file']);
    ?>
    then you can call to it with http://YOURWEBSPACE/highlight.php?file=xxxx and it'll give you a pretty formatted coloured output you can just print straight from your browser.
    HTH.
    Intresting, thanks.

  11. #11
    Theoretical Element Spud1's Avatar
    Join Date
    Jul 2003
    Location
    North West
    Posts
    7,508
    Thanks
    336
    Thanked
    320 times in 255 posts
    • Spud1's system
      • Motherboard:
      • Gigabyte Aorus Master
      • CPU:
      • 9900k
      • Memory:
      • 16GB GSkill Trident Z
      • Storage:
      • Lots.
      • Graphics card(s):
      • RTX3090
      • PSU:
      • 750w
      • Case:
      • BeQuiet Dark Base Pro rev.2
      • Operating System:
      • Windows 10
      • Monitor(s):
      • Asus PG35VQ
      • Internet:
      • 910/100mb Fibre
    i think textpad lets youdo this...cant remember 100% and dont have a printer plugged in atm to test, but i'm pretty sure it can do it.

  12. #12
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts
    Quote Originally Posted by seanblee
    For PHP code, take a look at http://uk2.php.net/manual/en/functio...light-file.php - just stick a file on your webspace named highlight.php containing:
    Code:
    <?php
    highlight_file($_GET['file']);
    ?>
    then you can call to it with http://YOURWEBSPACE/highlight.php?file=xxxx and it'll give you a pretty formatted coloured output you can just print straight from your browser.
    HTH.
    sean's example (sorry dude, still come pub tommorow yeh?)
    Is very dangerous in that form, PHP often has passwords and other goodies stored in the source files (PHP is inherently insecure, see number of forum 'hacks'). So stuff like SQL passwords can be got. But more serious if you have a private area on the site, odds are theres a bug in your code that leaves u vunerable to injection and overflow attacks (if you don't know what those mean, your most definatly vunerable to them). As such hiding ur source is rather important.

    You can use a reg exp, to only allow certain characters for file names, otherwise some nasty person might abuse it.
    throw new ArgumentException (String, String, Exception)

  13. #13
    Senior Member
    Join Date
    Aug 2004
    Location
    W Yorkshire
    Posts
    5,691
    Thanks
    85
    Thanked
    15 times in 13 posts
    • XA04's system
      • Motherboard:
      • MSI X570-A Pro
      • CPU:
      • AMD Ryzen 5 3600
      • Memory:
      • Corsair 2x 8gb DDR 4 3200
      • Storage:
      • 1TB Serpent M.2 SSD & 4TB HDD
      • Graphics card(s):
      • Palit RTX 2060
      • PSU:
      • Antec Truepower 650W
      • Case:
      • Fractcal Meshify C
      • Operating System:
      • Windows 10
      • Monitor(s):
      • iiyama 34" Curved UWQHD
      • Internet:
      • Virgin 100mb Fibre
    Quote Originally Posted by TheAnimus
    sean's example (sorry dude, still come pub tommorow yeh?)
    Is very dangerous in that form, PHP often has passwords and other goodies stored in the source files (PHP is inherently insecure, see number of forum 'hacks'). So stuff like SQL passwords can be got. But more serious if you have a private area on the site, odds are theres a bug in your code that leaves u vunerable to injection and overflow attacks (if you don't know what those mean, your most definatly vunerable to them). As such hiding ur source is rather important.

    You can use a reg exp, to only allow certain characters for file names, otherwise some nasty person might abuse it.
    Yeah. I know it's dangerous

  14. #14
    Flak Monkey! Dorza's Avatar
    Join Date
    Jul 2003
    Location
    UK - South Wales
    Posts
    1,762
    Thanks
    34
    Thanked
    17 times in 15 posts
    • Dorza's system
      • Motherboard:
      • Asus P5B Deluxe - WiFi
      • CPU:
      • Q6600 @ 3.06Ghz
      • Memory:
      • 2GB Crucial
      • Storage:
      • 500GB Samsung SpinPoint
      • Graphics card(s):
      • Geforce 9600GT
      • PSU:
      • Cosair HX520W
      • Case:
      • LianLi something something or other
      • Monitor(s):
      • Eizo FlexScan S1910 (1280*1024)
      • Internet:
      • 2mb Virgin (when they want to give me that: else 1mb)
    Jedit also prints in colour. It needs to be restarted for the settings to take palce. Wish i knew this a couple of days back, would have suggested this then.

  15. #15
    Member
    Join Date
    Aug 2005
    Location
    Coventry, UK
    Posts
    54
    Thanks
    0
    Thanked
    0 times in 0 posts
    Quote Originally Posted by XA04
    Yeah. I know it's dangerous
    Besides which, if it's only for printing out coursework, you can stick it up there, print all the files you need and then delete it again - I wasn't suggesting leaving it up there permanently. Any mechanism which exposes the source code of an application leaves it vulnerable to exploitation - one of the most-given disadvantages (or advantages depending on your viewpoint) of open source!

  16. #16
    Member
    Join Date
    Jun 2005
    Posts
    99
    Thanks
    22
    Thanked
    0 times in 0 posts
    also if you are using word or something to do you work you can copy the displayed color stuff in ie/ff and just paste it into word and it will keap its color.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Bendy electronic paper from Fujitsu
    By Steve in forum HEXUS News
    Replies: 2
    Last Post: 15-07-2005, 02:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •