Menu

#1 some problems

future_releases
open
nobody
5
2001-09-25
2001-09-25
No

I was going to do some more work with lpPDF before I
submitted anything, but some class work will prevent me
from doing that now. I just wanted to say a few things.
Hopefully I will get a chance to tinker a bit more
soon.
First off, I'm running lpPDF on FreeBSD 4.3. I'm
planning on trying to install it on Linux soon. I don't
know what to do with the patch file, so again, I was
hesitant to post this. However, I think a couple of the
issues I'll be addressing probably won't be fixed. They
are pretty general.
I can't get lpPDF to work due to a permissions
problem. I'm not sure what user lppdf is running as,
but I'll figure it out soon.
I had a couple problems with the lppdf script itself.
First of all, the design just doesn't allow for easy
updates. It's all kind of arranged sequentially, which
might make it difficult to maintain later on down the
road. While it's very small right now, I think there is
a potential to add some nifty features. After all,
people can always print to a postscript file and run
ps2pdf manually. Most of the code is devoted to finding
an appropriate filename from the postscript job. This
process could be configurable, perhaps to a degree that
would make it really exciting. A little .lppdfrc file
in someone's home directory might specify a naming
location and algorithm on an individual basis. Things
like that might easily push lpPDF to the point where a
more neat approach might be warranted. I wonder about
completely rewriting it. Again, I was hesitant to post
this because I haven't spent any time researching
postscript or trying to do something like that myself.
Personally, though, I'm a Python buff. I can't stand
all of Perl's little idiosyncracies.
Next, there have to be more checks. Maybe these were
implemented in 0.02-2. When I sent plain text to lpPDF,
it seemed to go into an infinite loop. I think the
problem was the following code:

while ($goon==0)
{
$_=<STDIN>;
push(@psheader,$_);
if (/\%\%EndComments/)
{
$goon=-1;
}
}

That's making a pretty big assumption =) As I said, I'm
willing to help code stuff like this (If I absolutely
_have_ to write in Perl, I will, but I will need to do
some brushing up on it). A simple check to see that
something is a postscript file might be sufficient. If
it says it is, perhaps we can trust it. Even so, other
checks to make sure we don't get into infinite loops
might be nice =) I'm sure this is only because it's
such an early release.
So here are my three questions...

1.) What do people think about completely rewriting the
lppdf script?
2.) What about rewriting it in Python?
3.) How do I get that patch to work? heh

I've never helped in an open-source project before, so
if I've said something that's silly, please let me
know.

Joshua Bronson

Discussion

  • Joshua Bronson

    Joshua Bronson - 2001-10-18

    Logged In: YES
    user_id=327889

    Okay, I figured out how to apply the patch (and after
    reading man patch I feel quite foolish). I've eliminated the
    problem with permissions, but I'm still getting errors on my
    console about files not existing:

    --------------------------------------------
    mv: rename
    /var/spool/lpd/lppdf/export/SourceForge-Modify-464968---some-problems.pdf
    to /var/spool/lpd/lppdf/export/SourceForge Modify 464968 -
    some problems.pdf: No such file or directory
    chmod: /var/spool/lpd/lppdf/export/SourceForge Modify 464968
    - some problems.pdf: No such file or directory

    Here's the log file entry

    ---------------------
    Splitting Header into...
    0: resnet181-178.resnet.buffalo.ed:jbronson
    1: Job:
    2: stdin
    3: Date:
    4: Thu
    5: Oct
    6: 18
    7: 00:24:52
    8: 2001

    Reading PS-Header
    Looking for Title..
    Found Title SourceForge: Modify: 464968 - some problems
    Creating a PDF name SourceForge Modify 464968 - some
    problems.pdf for jbronson on 18-Oct-2001_00-24 in Dir
    /var/spool/lpd/lppdf/export
    ->Creating File /tmp/SourceForge Modify 464968 - some
    problems.ps. Starting to write
    ->Writing finished.
    ->Distilling using ps2pdf -dPDFSETTINGS=/printer to
    /var/spool/lpd/lppdf/export/SourceForge Modify 464968 - some
    problems.pdf
    ->Distilling finished.
    ->Removing /tmp/SourceForge Modify 464968 - some problems.ps
    --------------------------------
    I modified some things slightly, so I'll attach my script.

     
  • Joshua Bronson

    Joshua Bronson - 2001-10-18
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.