PDF printer for puppy

Stuff that has yet to be sorted into a category.
Message
Author
nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#46 Post by nic2109 »

This is all fine and dandy, but I cannot print the PDF once created as epdfview gives a "Segmentation fault" and crashes out.

See forum thread http://www.murga-linux.com/puppy/viewtopic.php?t=20377.

I'm on 217 with the hpijs drivers package.

It's got me foxed - and BarryK too possibly. Any ideas anyone?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#47 Post by disciple »

That doesn't seem to be anything to do with CUPS-pdf, but anyway - you might have to try a different pdf reader like Xpdf or something if you need to print while it isn't fixed.

nic2109
Posts: 405
Joined: Mon 01 Jan 2007, 20:24
Location: Hayslope, near Middlemarch, Midlands, England

#48 Post by nic2109 »

disciple wrote:That doesn't seem to be anything to do with CUPS-pdf, but anyway - you might have to try a different pdf reader like Xpdf or something if you need to print while it isn't fixed.
I'm willing to try this, so how should I go about downloading and installing xpdf?

I cannot see it as either a PET or a DotPup package, while the website has scary comments about compiling and making and so on which make me want to run away (bravely).

Nick

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#49 Post by disciple »

There are links to three versions at http://www.murga-linux.com/puppy/viewtopic.php?t=8727
Colonel Panic recommends Adobe Reader 5, but it was very troublesome for me and other people too.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#50 Post by disciple »

Also, if you install GTKLP, it can print pdf files - but only the whole file - not certain pages.

http://www.murga-linux.com/puppy/viewto ... 03&t=17768

EDIT - it can print a selection of pages from a file - there is a space for extra options on the special tab. I've described some of them at http://puppylinux.org/wikka/Printing.
Last edited by disciple on Thu 06 Sep 2007, 05:35, edited 1 time in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#51 Post by disciple »

This is interesting - Opera doesn't seem to like either CUPS, or the PDF writer.

BTW are we likely to see v0.4 sometime, or has something happened to it?
Attachments
forum.jpg
(23.21 KiB) Downloaded 1436 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

CUPS and CUPS Pdf writer work in my Operas

#52 Post by vovchik »

I can confirm that Opera v. 8.01 and v. 9.10 work properly with CUPS and with the CUPS pdf writer. As I went through a few head-scratching months trying to get CUPS to work with my rather unpopular Xerox Phaser 3120, I have a suspicion that something is misconfigured. In my case, I had mistakenly overwritten two usblp files in /dev with some postscript files during an abortive CUPS configuration session. Once I identified and corrected that problem - and then chose an appropriate driver (not the easiest task) - everything regarding CUPS printing has gone swimmingly ever since.

With kind regards,
vovchik

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#53 Post by disciple »

Hmmm...
It seems like something funny must be going on with Opera (9.10) - I can't get it to print at all now, but other programs print fine.

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#54 Post by jcoder24 »

pdf-writer updated to version 0.6. Skipped 0.4 & 0.5 because of the amount of code reorganization done and the number of changes implemented.

New features (via config file)
1) Run in a console-only mode
2) Print job completion notification
3) Customize duration of notification
4) Customize notification type Full (inlcude path) or brief (filename only)

Changes
1) Config file renamed to ~/.pdfwriter.conf (NB hidden file)
2) Set correct permissions on config file
3) Reorganized code to better accommodate console only option
4) On xdialog gtk-warning or gtk-critical errors, exit gracefully but log to /var/log/messages reason and suggest usingconsole only mode
5) Sanity check - remove additional invalid characters in the filename entered by the user
6) Now works on other distros (at least on zenwalk)
7) Changed "Device URI" from pdf-writer:/export/share/pdf/ to pdf-writer:/dev/null since this is not used at all by the pdf-writer backend

Bug Fixes
1) Fixed problem determining home directory for non-root users
2) increased height of some dialog boxes as some text was being hidden depending on theme/wm used
3) Fixed prob when files were printed from stdin. The filename .pdf(....) was used as the default filename

To do
Create gui for managing preferences

~~~~~~~~~~~~
I've attached two files:

The first is the tar.gz cups-pdf backend script "pdf-writer". To test download and install with petget or "tar xvfz -C / pdf-writer.tar.gz"

The second is a WIP manual for cups-pdf/pdf-writer.

Once testing goes ok it will be packaged into a .pet.
Attachments
cupspdf-doc.txt.gz
cups-pdf | pdf-writer documentation
(2.03 KiB) Downloaded 850 times
pdf-writer.tar.gz
cups-pdf backend script
(2.53 KiB) Downloaded 844 times

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Version 6 works fine

#55 Post by vovchik »

Dear jcoder,

On my machine, every one of your pdf writer incarnations worked fine, including the latest one. I hope you find time to do the preferences part, since I don't know how to get my gs to print out ascii files to pdf using a nice font. They all come out outlooking pretty ugly with a courier type face. I would much prefer dejavu mono. Do you know off hand where I can change the default (e.g. a config file)?

WIth thanks in advance,
vovchik

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#56 Post by disciple »

I don't think it desperately needs to work with spaces in the filename, but fixing that might be almost as easy as this:
If you select a directory with a space in the path, the job gets stuck in the queue and the printer goes offline as before. If you restart the job from CUPS, it gives you the location selection dialogue again, with the space replaced, and if you accept this location you get an error message and it prints it as /Using_the_fallback_C_locale..pdf

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#57 Post by jcoder24 »

version 0.7

Changes
1) Changed preferences option USE_X to USE_XWINDOWS
2) Changed separator for preferences file to from space to ":" to accommodate MRUDs with spaces
3) Now prints to folders with spaces in their name
4) Now prints filename with spaces and
5) Added option in ~/.pdfwriter.conf for changing spaces to underscores
6) Some minor code fixes and clean up

Known Issues
Does not work correctly when printing the "Test Page" from the cups printer page. I'm looking into a universal fix for this (ie works on puppy and other distros).

NB
The documentation is to be updated to reflect these changes. BTW suggestions on additions/deletions/clarifications on the documentation is welcomed.
Attachments
pdf-writer.tar.gz
Version 0.7
Install with petget or "tar xvfz pdf-writer.tar.gz -C /"
(2.63 KiB) Downloaded 844 times

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#58 Post by disciple »

Great!
suggestions on additions/deletions/clarifications on the documentation
Where you say to restart CUPS, maybe put in an example or two of how to do this (it's not always the same, is it?).
So I would do this in a terminal:

Code: Select all

/etc/rc.d/rc.cups restart

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#59 Post by disciple »

It mostly seems very good.
If I cancel a print (In 2.16.1), it prints it as "/Created Using the fallback C locale..pdf"

Also I think in the documentation you forgot to update the lpadmin command for /dev/null ?

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#60 Post by jcoder24 »

I forgot to mention that you should remove the old preferences file before using the new version.

rm ~/.pdfwriter.conf

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#61 Post by disciple »

Also, the .pdf-writer.conf that it generates automatically has the first line

Code: Select all

MRUD:.
In 2.16.1, with it like this the file selection dialogue doesn't work and all it wants to do is print as "/Created Using the fallback C locale..pdf"

If I change that line to

Code: Select all

MRUD:/
or something,
then it works fine, and once I've printed to a directory it remembers it and still works.

-----------------
If you're interested, I only just got around to testing 0.3 on Grafpup 104
BTW, in version 0.3, I change the part of the code that was giving the problem with puppy version 1.xx. You can test that and let me know how it works.
It doesn't work unless I make the same changes I had to make with the previous versions.

Version 0.6 and 0.7 never pop up the file selection dialogue, and I'm just trying to think of a way to troubleshoot it - does anyone have any idea how I can print something in a way that I get some sort of message telling me how far it got?

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#62 Post by disciple »

Actually, the first line of the config file doesn't seem to be the problem, it just doesn't work after a reboot, but manually changing that line seems to be able to fix it. Very strange.

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

#63 Post by jcoder24 »

In 2.16.1, with it like this the file selection dialogue doesn't work and all it wants to do is print as "/Created Using the fallback C locale..pdf"
What do you mean by "the file selection dialogue doesn't work".
Actually, the first line of the config file doesn't seem to be the problem, it just doesn't work after a reboot, but manually changing that line seems to be able to fix it. Very strange.
That IS very strange indeed. The only time the config file changes is when someone prints a file or the when it is edited manually. Rebooting should not change the file.
If I cancel a print (In 2.16.1), it prints it as "/Created Using the fallback C locale..pdf"
When u cancel, do you use the mouse or keyboard? Performing Ok/Cancel actions via the keyboard may cause gtkdialog to issue errors. Is the file that's created actually named "/Created Using the fallback C locale..pdf"? If so it looks to be part of a gtkdialog error message. If it is, I'll need to know which type so i can fix it. At present the script accommodates gtk-warning and gtk-critical, i haven't seen any others.
Version 0.6 and 0.7 never pop up the file selection dialogue
This implies a problem with gtkdialog. To troubleshoot edit /etc/cups/cupsd.conf and change the log level to debug and restart cups. Then you can run "tail -f /var/log/cups/error_log" and check for error messages or post them here for me to have a look. Also some info is logged to /var/log/messages by the pdf-writer script/backend.
If you're interested, I only just got around to testing 0.3 on Grafpup 104. It doesn't work unless I make the same changes I had to make with the previous versions.
The redirection that's giving the problem in grafpup & puppy 1.x versions (I believe) is mainly "aesthetic" and could probably be left out from the main package. I'll test it and see how much things change.

NB. I tested the 0.7 on puppy2.1.6 and wasn't able to reproduce the problems you have mentioned. Testing with new pup_save file or running from ram only and see if you get the same problem.

User avatar
jcoder24
Posts: 604
Joined: Fri 06 May 2005, 12:33
Location: Barbados

Re: Version 6 works fine

#64 Post by jcoder24 »

vovchik wrote:I hope you find time to do the preferences part, since I don't know how to get my gs to print out ascii files to pdf using a nice font. They all come out outlooking pretty ugly with a courier type face. I would much prefer dejavu mono. Do you know off hand where I can change the default (e.g. a config file)?
I'll have to research this one. I have a few ideas but I'll have to see if any are possible.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#65 Post by disciple »

What do you mean by "the file selection dialogue doesn't work".
I mean that clicking on anything (with any button/scroll wheel etc) makes it disappear, and then it prints the file as "/Using the fallback C locale..pdf". It is as if clicking anything makes it think you've clicked cancel. I seem to remember seeing the same problem described before for a gtkdialog app.
That IS very strange indeed. The only time the config file changes is when someone prints a file or the when it is edited manually. Rebooting should not change the file.
It does not change the file - just for some reason the printer doesn't work after a reboot.
I confused us because when I initally installed 0.7 I hand updated the file, and it worked, then the next day (after a reboot) deleted the file to see what was automatically generated, and it then didn't work, so I changed that first line and it worked, so I assumed it was the contents of the first line that broke it, but actually it seems to be booting that breaks it - still "very strange" though.
When u cancel, do you use the mouse or keyboard?
mouse
Is the file that's created actually named "/Created Using the fallback C locale..pdf"?
no - sorry about that. The notification says "Created /Using the fallback C locale..pdf", and the file is "/Using the fallback C locale..pdf"


Thanks for the troubleshooting tips. Unfortunately I'm rather busy and it might be a while before I can do that or even test in a new 2.16 save file.

Post Reply