Unix Technical Forum

Printing Problem - Apsfilter(?)

This is a discussion on Printing Problem - Apsfilter(?) within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I installed apsfilter but I seem to have a problem printing postscript files. The test page printed OK at ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 07:03 PM
Mike
 
Posts: n/a
Default Printing Problem - Apsfilter(?)

I installed apsfilter but I seem to have a problem printing postscript
files. The test page printed OK at the end of installation but, when I
later tried to print another .ps file, everything seemed to be moved up
by 17.5mm.

I tried printing the test file again - cat test.ps | lpr -Pdj930 and
this it too was moved up by the same amount. (Well, parts of it were - I
think the positioning of other parts might be calculated during printing
but I'm not that good at understanding the ps instructions )

I'm using a HP Deskjet 930C printer with the printcap set-up by the
apsfilter SETUP. I'm printing on A4 paper which is 17.5mm longer than
the American "letter" paper (co-incidence?). Some of the test files
included with apsfilter seem to print OK but others are moved up.

I suspect apsfilter is passing the wrong paper size to ghostscript (or
ghostscript is ignoring it).

Has anyone else had this problem and, if so, what's the fix? All the
packages are from Slackware Vn9.0

--
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 07:03 PM
Bartosz Oudekerk
 
Posts: n/a
Default Re: Printing Problem - Apsfilter(?)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike <spamdump@fensoft.co.uk> is thought to have
typed the following text on 2003-10-24:

> I'm using a HP Deskjet 930C printer with the printcap set-up by the
> apsfilter SETUP. I'm printing on A4 paper which is 17.5mm longer than
> the American "letter" paper (co-incidence?). Some of the test files
> included with apsfilter seem to print OK but others are moved up.
>
> I suspect apsfilter is passing the wrong paper size to ghostscript (or
> ghostscript is ignoring it).
>

Check the relevant /etc/printcap entry, does it metnion the correct
papersize? Does it reference a file? Does that contain the papersize?

- --
Bartosz Oudekerk

Play Rogue, visit exotic locations, meet strange creatures
and kill them.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/mSjH256ZyNYAOpkRAllmAJ9Y5sappq8fYYeqUeObxGnsY1E9PA CeOqlu
cYkyUsFpocDBMk94jjHGKjE=
=7EoG
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-18-2008, 07:03 PM
Mike
 
Posts: n/a
Default Re: Printing Problem - Apsfilter(?)

In message <slrnbpia68.1nv.tyranas@lappie.unreachablehost.net >, Bartosz
Oudekerk <tyranas@lappie.unreachablehost.net> writes
>Mike <spamdump@fensoft.co.uk> is thought to have
>typed the following text on 2003-10-24:
>
>> I'm using a HP Deskjet 930C printer with the printcap set-up by the
>> apsfilter SETUP. I'm printing on A4 paper which is 17.5mm longer than
>> the American "letter" paper (co-incidence?). Some of the test files
>> included with apsfilter seem to print OK but others are moved up.
>>
>> I suspect apsfilter is passing the wrong paper size to ghostscript (or
>> ghostscript is ignoring it).
>>

>Check the relevant /etc/printcap entry, does it metnion the correct
>papersize? Does it reference a file? Does that contain the papersize?
>

The /etc/printcap looks OK -

# APS1_BEGINrinter1
# - don't delete start label for apsfilter printer1
# - no other printer defines between BEGIN and END LABEL
dj930|ijs/DESKJET_930;r=300x300;q=medium;c=full;p=a4;m=auto: \
:lp=/dev/lp1:\
:if=/etc/apsfilter/basedir/bin/apsfilter:\
:sd=/var/spool/lpd/dj930:\
:lf=/var/spool/lpd/dj930/log:\
:af=/var/spool/lpd/dj930/acct:\
:mx#0:\
:sh:
# APS1_END - don't delete this


and /etc/apsfilter/dj930/apsfilterrc has the entry PAPERSIZE='a4'

I tried changing the paper size to 'letter' but that didn't seem to make
any difference so the 17.5mm difference might be a red-herring.
--
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-18-2008, 07:03 PM
Douglas Mayne
 
Posts: n/a
Default Re: Printing Problem - Apsfilter(?)

On Fri, 24 Oct 2003 06:26:01 -0600, Mike wrote:

> I installed apsfilter but I seem to have a problem printing postscript
> files. The test page printed OK at the end of installation but, when I
> later tried to print another .ps file, everything seemed to be moved up
> by 17.5mm.
>
> I tried printing the test file again - cat test.ps | lpr -Pdj930 and
> this it too was moved up by the same amount. (Well, parts of it were - I
> think the positioning of other parts might be calculated during printing
> but I'm not that good at understanding the ps instructions )
>

How was test.ps generated. Was is created in an application which
set the papersize to "US letter"?

BTW, the apsfilter SETUP includes a print test page option where all
options sent to gs can be examined. Check the parameters closely.

--Douglas Mayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-18-2008, 07:04 PM
Mike
 
Posts: n/a
Default Re: Printing Problem - Apsfilter(?)

In message <bnbf5r$hrp$1@terabinaries.xmission.com>, Douglas Mayne
<ddmayne@localnet.com> writes
>On Fri, 24 Oct 2003 06:26:01 -0600, Mike wrote:
>
>> I installed apsfilter but I seem to have a problem printing postscript
>> files. The test page printed OK at the end of installation but, when I
>> later tried to print another .ps file, everything seemed to be moved up
>> by 17.5mm.
>>
>> I tried printing the test file again - cat test.ps | lpr -Pdj930 and
>> this it too was moved up by the same amount. (Well, parts of it were - I
>> think the positioning of other parts might be calculated during printing
>> but I'm not that good at understanding the ps instructions )
>>

>How was test.ps generated. Was is created in an application which
>set the papersize to "US letter"?
>

I used the file apsfilter/setup/test.ps The same one that SETUP uses.

>BTW, the apsfilter SETUP includes a print test page option where all
>options sent to gs can be examined. Check the parameters closely.
>

SETUP prints the test file out OK, it's when I try to print normally
that it goes wrong. I tried changing SETUP to use my .ps file instead
of test.ps - SETUP printed my file OK so the problem must be in the
filter (I think).

--
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-18-2008, 07:04 PM
Mike
 
Posts: n/a
Default Re: Printing Problem - Apsfilter(?)

In message <z8mWZJLufUm$EwQ5@fenlandsoftware.demon.co.uk>, Mike
<spamdump@fensoft.co.uk> writes
>In message <bnbf5r$hrp$1@terabinaries.xmission.com>, Douglas Mayne
><ddmayne@localnet.com> writes
>
>>BTW, the apsfilter SETUP includes a print test page option where all
>>options sent to gs can be examined. Check the parameters closely.
>>

>SETUP prints the test file out OK, it's when I try to print normally
>that it goes wrong. I tried changing SETUP to use my .ps file instead
>of test.ps - SETUP printed my file OK so the problem must be in the
>filter (I think).
>

Curiouser and curiourser. I captured the gs parameters in the filter by
adding the line "echo $gs_cmd > /tmp/gs_cmd" to the print_ps routine in
the filter and attempting to print my .ps file. As expected, the
line-up was wrong. I then made /tmp/gs_cmd executable (and added
-dBATCH to the gs parameter string) and ran
"cat myfile.ps | gs_cmd > /dev/lp1" - it printed OK. Adding -dBATCH to
the parameter string in apsfilter made no difference.

--
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-18-2008, 07:05 PM
Mike
 
Posts: n/a
Default Re: Printing Problem - Apsfilter(?)

In message <tKLxEqFZpRm$EwB8@fenlandsoftware.demon.co.uk>, Mike
<spamdump@fensoft.co.uk> writes
>I installed apsfilter but I seem to have a problem printing postscript
>files. The test page printed OK at the end of installation but, when I
>later tried to print another .ps file, everything seemed to be moved up
>by 17.5mm.
>


OK, I've solved it (sort of). For anyone who's interested, the problem
seems to be in the ps_postprocessing routine of apsfilter. I don't know
why or how but bypassing that routine solved the problem. Interestingly,
when I tried to find out what it did, it didn't appear to do anything!

Anyway, it's working now so I'll just wait to see what problems I've
caused by changing it <g>.

--
Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:55 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com