Menu

pic2plot postscript output problem

Help
2005-10-11
2012-07-26
  • Josh Mueller

    Josh Mueller - 2005-10-11

    I am trying to use pic2plot to generate a ps file. This is not working. I use the following command line and get the following error

    c:\>pic2plot -Tps test.pic > test.ps
    libplot error: output stream jammed

    trying all of the output options yields:
    png: works
    pnm: works
    gif: works
    svg: libplot error: output stream jammed
    ai: libplot error: output stream jammed
    ps: libplot error: output stream jammed
    cgm: libplot error: output stream jammed
    fig: libplot error: output stream jammed
    pcl: libplot error: output stream jammed
    hpgl: libplot error: output stream jammed
    regis: works
    tek:works

    If anyone could tell me what I am doing wrong I would greatly appreciate the help.

     
    • Nobody/Anonymous

      I am having the same problem. Can anyone help ?

       
      • Nobody/Anonymous

        I had the same problems when using pic2plot.
        I found the solution on the UMLGraph homepage:

        "On Windows platforms note that the current version of pic2plot appears to be very picky about carriage return (CR - \r) characters (by default, CR is part of the platform's end of line sequence) appearing in its input file. Therefore, you will probably want to instruct your editor to create Unix-style files, or filter the files to remove the carriage return characters. The following Perl invocation is such a filter:"
        http://www.spinellis.gr/sw/umlgraph/doc/indexw.html#cr

        it works for me :)

         
        • Nobody/Anonymous

          I had the same problem with pic2plot 2.4 on MSW/XP:

          I removed CR as suggested, verified that only LFs are included: no success. :-(

          Then I downloaded the source code and looked into the parser included in main.cc, especially on what is happening in function do_file:

          the conclusion was that a " " after .PS could help (I also added it after .PE):

          line 589:
          case HAD_PS:
          if (c == ' ' || c == '\n' || compatible_flag)
          {
          ungetc(c, fp);
          do_picture(fp); // do the picture, incl. args of .PS if any
          state = START;
          }

          Immediately, I got valid output files. :-)

          Then I tried it with CR/LFs in a file, it is working ,too, but error messages are issued:

          pic2plot:test1.pic:2: illegal input character code 13

          However, they do not prevent generation of output, it seems these are warnings, only. The picture was drawn as expected.

          There seems to be confusion if a '\n' follows immediately .PS, the check of c=='\n' seems to fail, but by a trailing blank the call of "do_picure" is enforced, too.

          I have chosen pic2plot because I failed too for plotlib previously: no output and a crash on call of pl_closepl_r though a valid pointer/plotter handle was returned and all operations were executed without returning an error or issueing an error message including execution of pl_endpath_r ...

           
    • Nobody/Anonymous

      It does seem to produce a valid Encapsulated Postscript image, so I think the error message is harmless (and you're probably not doing anything wrong).

       
      • Nobody/Anonymous

        I get the same error, and it doesn't actually produce the graph, just some postscript boilerplate. So it's not working.

         
        • Nobody/Anonymous

          try using the cygwin port of plotutils.

           
MongoDB Logo MongoDB