AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
Expand all | Collapse all

Ghostscript

  • 1.  Ghostscript

    Posted Wed October 24, 2007 05:28 PM

    Originally posted by: capeme


    I am trying to use Ghostscript on AIX to print pdf's and it seems I have downloaded it and all dependencys fine - install went fine, when I type any gs commnad except gs -h it just hangs..Here is what it says before the hang:
    GNU Ghostscript 5.50 (2000-2-13)
    Copyright (C) 1998 Aladdin Enterprises, Menlo Park, CA. All rights reserved.
    This software comes with NO WARRANTY: see the file COPYING for details
    Anyone have any thoughts?


  • 2.  Re: Ghostscript

    Posted Thu October 25, 2007 07:17 AM

    Originally posted by: SystemAdmin


    Wouldn't it make more sense to use Adobe Acrobat to print pdf files?

    FWIW

    Jim Lane


  • 3.  Re: Ghostscript

    Posted Thu October 25, 2007 08:10 AM

    Originally posted by: capeme


    Well funny you should say that as I was looking at that last night and actually downloaded it ont he box and am now getting all the pre-req's it wants; GTK+ library, CUPS, etc.....So I use that to canvert the pdf to ps and then send it to the printer? I am using remote print queues for my printers, any issue that you know of?


  • 4.  Re: Ghostscript

    Posted Thu October 25, 2007 03:37 PM

    Originally posted by: bhead


    I just finished up installing Adobe today, turned it over to the apps guys to test it out so I'm not sure about any print queue problems, at least not yet. I didn't install CUPS, didn't install the Adobe plugins either. Here is the list of rpm's I installed, downloaded from AIX toolbox:

    libpng-1.2.8-5
    libtiff-3.6.1-4
    libjpeg-6b-6
    xrender-0.8.4-7
    xcursor-1.0.2-3
    gettext-0.10.40-6
    glib2-2.8.1-3
    atk-1.10.3-2
    freetype2-2.1.7-5
    expat-1.95.7-4
    fontconfig-2.2.2-5
    xft-2.1.6-5
    cairo-1.0.2-6
    pango-1.10.0-2
    gtk2-2.8.3-9

    After that it was complaining about the DISPLAY variable not being set but I don't want to use the gui. Coded a one liner like this:

    #!/usr/bin/ksh
    #
    1. test_adobe.ksh
    #
    /usr/bin/acroread -toPostScript
    from the command line:
    ./test_adobe.ksh < inputfilename > outputfilename

    That seems to work without the display error.

    > Well funny you should say that as I was looking at
    > that last night and actually downloaded it ont he box
    > and am now getting all the pre-req's it wants; GTK+
    > library, CUPS, etc.....So I use that to canvert the
    > pdf to ps and then send it to the printer? I am
    > using remote print queues for my printers, any issue
    > that you know of?


  • 5.  Re: Ghostscript

    Posted Fri October 26, 2007 05:17 PM

    Originally posted by: capeme


    What initial Adobe file did you install??Maybe I have the wrong thing....


  • 6.  Re: Ghostscript

    Posted Mon October 29, 2007 08:53 AM

    Originally posted by: bhead


    > What initial Adobe file did you install??Maybe I have
    > the wrong thing....

    version 7.0.9, couldn't find version 8 compiled for AIX. If you go to the Adobe download page, after clicking on "Get Adobe Reader" image select "Choose a different version".


  • 7.  Re: Ghostscript

    Posted Wed October 31, 2007 06:19 PM

    Originally posted by: capeme


    Okay so I will try all this - sorry fo the delay I was at at customers site the last couple days....
    I will let you know tomorrow.
    Thanks!


  • 8.  Re: Ghostscript

    Posted Wed November 07, 2007 11:18 AM

    Originally posted by: capeme


    Hi:
    I am now finally trying all this and everytime I try it I get the following error:

    (acroread:1085544): Gtk-WARNING **: cannot open display:
    Is this the error you got??? I am running
    #!/usr/bin/ksh
    #
    #test_adobe.ksh
    #
    /usr/bin/acroread -toPostScript
    as you had suggested and still getting an error...
    How did you get rid of this?


  • 9.  Re: Ghostscript

    Posted Thu November 08, 2007 08:02 AM

    Originally posted by: SystemAdmin


    I hate to say so but I don't think you can get around this. I've tested it on my system and you need to have the DISPLAY variable validly set even though the -toPostScript option doesn't display anything. The syntax BTW is:

    acroread -toPostScript <somefile.pdf>

    When you run this you end up with "somefile.ps" in the current working directory. I'm not sure why there isn't a batch option of some kind but there you have it.

    Regards,
    Jim Lane


  • 10.  Re: Ghostscript

    Posted Thu November 08, 2007 10:09 AM

    Originally posted by: capeme


    Ah, so probably the reason I was getting an empty doc was my syntax not hat error..
    I will try this and let you know.
    thanks


  • 11.  Re: Ghostscript

    Posted Fri November 09, 2007 01:18 PM

    Originally posted by: capeme


    According to Adobe this error can be corrected setting hte display variable.
    Did you address this via your script or?


  • 12.  Re: Ghostscript

    Posted Mon November 12, 2007 11:20 AM

    Originally posted by: bhead


    Sorry, Jim is correct, I was in a hurry when I was playing around with it, I'm guessing I forgot to unset my display variable before testing with a script. I just tried it again, you have to set this variable before it'll work. I don't know of a way around it.


  • 13.  Re: Ghostscript

    Posted Mon November 12, 2007 11:47 AM

    Originally posted by: capeme


    i guess I am confused. If you are not running a Xserver what do you se the display variable to?


  • 14.  Re: Ghostscript

    Posted Mon November 12, 2007 12:07 PM

    Originally posted by: bhead


    I just searched Adobe's forum, found a couple of hits. There is a post referencing this problem, it appears to be a bug in version 7.0.9. They state that it's fixed in version 8.1.1 but that verison is not available for AIX, at least that I'm aware of. Here is a link to the post:

    http://www.adobeforums.com/webx/.3c054659


  • 15.  Re: Ghostscript

    Posted Mon November 12, 2007 12:15 PM

    Originally posted by: capeme


    Yea, I had already found this and I was hoping someone had a way around..Someone said try just using Xpdf but I am having trouble figuring out how to make that work..I guess the bottom line is I need a way around not running a Xserver..
    any other ideas?


  • 16.  Re: Ghostscript

    Posted Mon November 12, 2007 05:19 PM

    Originally posted by: SystemAdmin


    Have you tried a 'virtual X buffer'.

    The AIX X server has been enhanced to support the X Virtual Frame Buffer technology.
    The X Virtual Frame Buffer (XVFB) allows the X server to initialize and run without
    the presence of any physical graphics adapter. In the past, the X server required
    one or more graphics adapters in order to run and would exit with an error if none
    were present.
    It's been awhile since I've played with this, but it may be just what you need.

    AIX 5.X
    The XVFB for AIX 5.X is installed from the AIX 5.X product CDs. Install the following filesets substituting the X with the actual version number:

    OpenGL.OpenGL_X.dev.vfb.05.0X
    X11.vfb.05.0X
    Starting the XVFB
    The XVFB is loaded into the X server with the -vfb flag:

    /usr/bin/X11/X -force -vfb -x abx -x dbe -x GLX :n &
    where n is the display number you wish to have associated with this instance of the XVFB. This starts the X server without using any installed graphics adapter and loads the OpenGL extensions to the X server.

    The xinit command, which starts both the X server and the window manager, can also be used. The xinit command looks for the display number immediately following the -- . If it finds no display number in this position, it uses the default display.

    /usr/bin/X11/xinit -- :n -force -vfb -x abx -x dbe -x GLX &

    The syntax of the xinit command used for starting XVFB is the same as that used for starting a normal Xserver. For more information, see the xinit command in the AIX Commands Reference. The general form of this command is:

    xinit Options Options
    Where Options for XVFB would need to include -vfb -force unless these flags were contained in the xserverrc Server file. Note that all the commands listed need to be on a single line.

    For example, to start XVFB on display 11 using the default xinitrc and xserverrc files, type:

    xinit -- :11 -vfb -force &
    or, to start XVFB on display 11 using other client and server options, type:

    xinit /Pathname/Client_Filename -- /Pathname/Server_Filename :11 -vfb -force &


  • 17.  Re: Ghostscript

    Posted Tue November 13, 2007 12:44 PM

    Originally posted by: bhead


    Great suggestion CompuChem, when I started checking into this I noticed another admin must have already set this up on this development server. Coded a little batch script w/DISPLAY variable set to the servers IP and session id, submitted to background via at and it works like a charm.

    Thanks for the info,
    bh


  • 18.  Re: Ghostscript

    Posted Tue November 13, 2007 01:54 PM

    Originally posted by: capeme


    bhead - you lost me there??Are you talking about directing the display to your current logon session???Can you share the script?


  • 19.  Re: Ghostscript

    Posted Tue November 13, 2007 02:43 PM

    Originally posted by: bhead


    No, to the IP address of the server,

    export DISPLAY=ip_address:session_id

    like this:

    export DISPLAY=192.168.1.1:11


  • 20.  Re: Ghostscript

    Posted Tue November 13, 2007 02:45 PM

    Originally posted by: capeme


    where is that session Id comming from and what exactly is it refering to?


  • 21.  Re: Ghostscript

    Posted Tue November 13, 2007 03:04 PM

    Originally posted by: bhead


    Read CompuChem's last post, he gives instructions for running xserver. You need to have that set up first, if you haven't alredy.


  • 22.  Re: Ghostscript

    Posted Tue November 13, 2007 03:09 PM

    Originally posted by: capeme


    Allright - let me take a look at this and see if I get it.
    Thanks


  • 23.  Re: Ghostscript

    Posted Thu November 15, 2007 11:24 AM

    Originally posted by: capeme


    Okay so I figured out the xserver issue but if I have users that cannot use xclient to login any idea how I get around that???Can I just make my login the display???


  • 24.  Re: Ghostscript

    Posted Thu November 15, 2007 11:51 AM

    Originally posted by: bhead


    It shouldn't matter if they are using telnet, putty, etc. You set the DISPLAY variable to whatever the server's IP address is and display number you used when you set up xserver.

    Here is what my running xinit task looks like (keep in mind I didn't set this up, xinit was already running):

    /usr/lpp/X11/bin/xinit /usr/lpp/X11/bin/mwm -- :1 -vfb -force -x abx -x dbe -x GLX

    So the display number is "1". Let's say this task is running on an AIX server with IP address of 199.200.1.1 and the display number is 1. Try coding a script like this:

    #!/usr/bin/ksh
    #
    1. script mytest.ksh
    #
    export DISPLAY=199.200.1.1:1
    /usr/bin/acroread -toPostScript

    Then from the command line:

    ./mytest.ksh < test.pdf > test.ps

    Where test.pdf is the name of your input PDF file and test.ps is whatever you want to name the output file to.


  • 25.  Re: Ghostscript

    Posted Thu November 15, 2007 11:54 AM

    Originally posted by: bhead


    Correction, somehow cut and pasted in "1. script mytest.ksh" in example, leave that line out. So it looks like this:

    #!/usr/bin/ksh
    #
    1. script mytest.ksh
    #
    export DISPLAY=199.200.1.1:1
    /usr/bin/acroread -toPostScript


  • 26.  Re: Ghostscript

    Posted Thu November 15, 2007 11:55 AM

    Originally posted by: bhead


    Man, don't know why that keeps showing up, just leave out that line.


  • 27.  Re: Ghostscript

    Posted Thu November 15, 2007 11:56 AM

    Originally posted by: capeme


    oaky let me try this and I will let you know.


  • 28.  Re: Ghostscript

    Posted Tue December 04, 2007 05:52 PM

    Originally posted by: capeme


    Hi all:
    I have it running now but when I print the postscript files it does not fit on the page though it looks good when I view it - any thoughts?


  • 29.  Re: Ghostscript

    Posted Tue December 04, 2007 05:54 PM

    Originally posted by: SystemAdmin


    That has got to be some configuration parameter for the type of printer in acroread.