Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Edit & print PCL generated PRN file

Edit & print PCL generated PRN file

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    balu12345
    wrote on last edited by
    #1

    Hi All, I have .Prn file which was generated out of PCL printer.I need to find a string in that file and then I have to replace it with another string. Iam able to do it by using stream writer,streamreader,Binary reader,binary writer and file streams. But if gave a print(LPR)for it, it get failed and giving me syntax error as Illegal tag. If I print original file it is printing very well. I came to know that while writing it has lost some of its originality ,so it was failed Please help me Thanks in advance

    I 1 Reply Last reply
    0
    • B balu12345

      Hi All, I have .Prn file which was generated out of PCL printer.I need to find a string in that file and then I have to replace it with another string. Iam able to do it by using stream writer,streamreader,Binary reader,binary writer and file streams. But if gave a print(LPR)for it, it get failed and giving me syntax error as Illegal tag. If I print original file it is printing very well. I came to know that while writing it has lost some of its originality ,so it was failed Please help me Thanks in advance

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      It sounds like you've done more than just changing the string. I don't know about the format, but maybe just before the string is a tag describing the string and its length? Try replacing just one character in the string - or maybe make one already there be in upper instead of lower case. Yours experimentally, Iain.

      Codeproject MVP for C++, I can't believe it's for my lounge posts...

      B 1 Reply Last reply
      0
      • I Iain Clarke Warrior Programmer

        It sounds like you've done more than just changing the string. I don't know about the format, but maybe just before the string is a tag describing the string and its length? Try replacing just one character in the string - or maybe make one already there be in upper instead of lower case. Yours experimentally, Iain.

        Codeproject MVP for C++, I can't believe it's for my lounge posts...

        B Offline
        B Offline
        balu12345
        wrote on last edited by
        #3

        Hi, Thanks for the reply, The original file size is like 16k, after the editing it becoming as 22k.. more over it is not normal file,It is a file generated by PCL printer. So may be during the conversion it is losing printer supported font. so that's the reason printer cannot understand the file(after editing)to print.so it gives syntax error as Kernel and Illegal tag error. I have no clues to overcome this problem kindly help me

        I 1 Reply Last reply
        0
        • B balu12345

          Hi, Thanks for the reply, The original file size is like 16k, after the editing it becoming as 22k.. more over it is not normal file,It is a file generated by PCL printer. So may be during the conversion it is losing printer supported font. so that's the reason printer cannot understand the file(after editing)to print.so it gives syntax error as Kernel and Illegal tag error. I have no clues to overcome this problem kindly help me

          I Offline
          I Offline
          Iain Clarke Warrior Programmer
          wrote on last edited by
          #4

          If the size is changing from 16k to 22k, you're doing a lot more than swapping a string! Just try with baby steps. Tweak one little bit, test, tweak a bigger bit, test, and so on. I've no idea about the format either - this is just general advice. It's worth jumping in the deep end sometimes, but other times you just dip one toe in the water. Iain.

          Codeproject MVP for C++, I can't believe it's for my lounge posts...

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups