Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 19 Dec 2014, 08:00
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
PDF printer for puppy
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 7 [96 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Author Message
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Sun 02 Sep 2007, 21:27    Post subject:  

Also, the .pdf-writer.conf that it generates automatically has the first line
Code:
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:
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
Quote:
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?
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Sun 02 Sep 2007, 22:05    Post subject:  

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.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Tue 04 Sep 2007, 15:13    Post subject:  

Quote:
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".

Quote:
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.

Quote:
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.

Quote:
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.

Quote:
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.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Tue 04 Sep 2007, 15:22    Post subject: Re: Version 6 works fine  

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.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Tue 04 Sep 2007, 20:10    Post subject:  

Quote:
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.

Quote:
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.

Quote:
When u cancel, do you use the mouse or keyboard?
mouse

Quote:
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.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 05 Sep 2007, 09:34    Post subject:  

Everything you've mentioned seem to be indicating a gtk/Xdialog problem, most likely due to your locale. What locale do you use? Try the fix mentioned at http://www.murga-linux.com/puppy/viewtopic.php?p=133698#133698 and let us know if it works.

The reason your Gtk-WARNING isn't caught by the script is because it's on the second last line returned from Xdialog. In the next version I'll do a check for the locale message and then export one that works. I'll also try to include checking all the output instead of the last line.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Wed 05 Sep 2007, 18:41    Post subject:  

Ah, yes. That fixed everything. Thanks.
My locale is en_NZ.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Wed 05 Sep 2007, 19:53    Post subject:    

Hmmm. I don't seem to have a cups log file. I wonder how I can get one?

I have this though:
Code:
# tail -f /var/log/messages
Sep  6 11:24:02 (none) user.notice root: pdf-writer started: 1 root pdf on localhost - CUPS v1.1.23 1 
Sep  6 11:24:02 (none) user.notice root: pdf-writer: WARNING: /root/.Xauthority not found! Switch to console mode!


Mounting my 2.16 save file, it doesn't have a /root/.Xauthority either - strange. So I make a blank file called that and comment out those redirections in pdf-writer and add the lines at the top for the broken locale, and it works great. Except for some strange reason when it first opens the file selection dialogue, it doesn't show files in the right hand pane. If I navigate out of the directory and then back, it does show them.

This is great. It's just what I always wanted. Thanks jcoder! Smile Smile
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Wed 05 Sep 2007, 20:34    Post subject:  

Instead of making /root/.Xauthority I can just comment out the lines in pdf-writer dealing with it.

The save as dialogue initially not showing files in the right-hand pane is curious. It is like that after a reboot until I print something, then when I print other things it works perfectly. If I cancel the print it still doesn't initially show files, until I have actually printed something.

Anyway - it's great.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 05 Sep 2007, 22:41    Post subject:  

disciple:

For all of you dedicated testing I've decided to upload an early version --pdf-writer 0.8rc1. This is rc1 because of the limited testing. Also I plan to rearrange the code somewhat to make it a little more efficient and to complete item 1 in the TODO list below.

Test and let me know if any issues remain. Unless anyone has feature requests I think this will be the final 'feature' update to the driver.

The remainder of the post has been merged with the following postbelow

Last edited by jcoder24 on Thu 06 Sep 2007, 20:40; edited 3 times in total
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Thu 06 Sep 2007, 00:21    Post subject:  

No - that doesn't seem to have fixed the locale issue. I didn't check whether it breaks after a reboot, but cancelling behaves just like the previous version Sad

Feature Requests - If you were really keen you could add buttons in the notification message to open the file and to open the location of the file (I guess you could go crazy, and have buttons to email the file and a whole bunch of stuff, but these two I think would be quite useful).

I guess for compatibility the best way to do this would probably be to add settings to specify the commands to open the file manager, and the pdf viewer, and then make ROX the default for both, so the pdf will just be opened the same way as if you clicked on it in ROX.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Thu 06 Sep 2007, 20:34    Post subject:  

Version 0.8

Changes
1) Now handles printing test pages and printing from remote machines. NB when printing a test page or remotely, the driver uses console mode and no notifications are displayed. However a log entry is added to /var/log/messages. Since 0.8 rc1, was modified so that it doesn't display file dialog when printing remotely to a puppy machine.

2) New preferences option SHARED_DIR which specifies the location of files printed remotely or via the test print option. This defaults to /shared/pdfs. If it doesn't exists it will be created when needed. Suggestions on a default folder are welcomed.

3) Now checks for "locale" error message and exports appropiate env variables for Xdialog and Xmessage to function. Fixed and tested with locale en_NZ since 0.8 rc1.

4) Checks if the os=puppylinux and ignores the missing ~/.Xauthority.

5) Cleaned up an rearrange code to make it follow more logically. This should have (hopefully) gotten rid of the bug where MRUD was updated incorrectly as experienced by disciple.


Known issues
1) Requires a hack to make it work with puppy/grafpup versions1.x.y.

TODO
1) Update documentation and convert to html
2) Update pinstall.sh script for pup/petget
3) complete install.sh (script for install on other distros)
4) Create gui (volunteers welcome)

NB TODO item #1 was to "Implement code to test all output from Xdialog instead of only the last line". This is not possible since the gtk error/warnings are always thrown (the reason why we original only checked the last line
pdf-writer-0906-1651.tar.gz
Description  extract with "tar xvfz pdf-writer-0906-1651.tar.gz -C /"
gz

 Download 
Filename  pdf-writer-0906-1651.tar.gz 
Filesize  2.93 KB 
Downloaded  614 Time(s) 
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Fri 07 Sep 2007, 02:27    Post subject:  

Smile It works well, except for that strange thing I'm having of initially not seeing files in the right hand pane.

So just to clarify for anyone else using it with Puppy 1.x, or if anybody trying it in another OS only gets blank pages printed: Open the pdf-writer file as text, and change these lines:
Code:
        $PS2PDF $6 "$FILENAME" &> /dev/null #jcoder24 changed >& to &> and enclosed filename in ""
else
        $PS2PDF - "$FILENAME" &> /dev/null #jcoder24 changed >& to &> and enclosed filename in ""
(lines 232-234) to:
Code:
        $PS2PDF $6 "$FILENAME" #&> /dev/null #jcoder24 changed >& to &> and enclosed filename in ""#commented for Grafpup104
else
        $PS2PDF - "$FILENAME" #&> /dev/null #jcoder24 changed >& to &> and enclosed filename in ""#commented for Grafpup 104

Anyone using Grafpup 1.x or a non-Puppy OS that runs only as root will also need to comment out the lines dealing with .Xauthority, or make sure they have that file in their home folder.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Fri 14 Sep 2007, 10:55    Post subject:  

jcoder24 wrote:
Version 0.8

Known issues
1) Requires a hack to make it work with puppy/grafpup versions1.x.y.

TODO
1) Update documentation and convert to html
2) Update pinstall.sh script for pup/petget
3) complete install.sh (script for install on other distros)
4) Create gui (volunteers welcome)


This the petget package for v0.8.

Updates

pdf-writer backend
1) Took the decision to update the code causing problems with puppy/grafpup version 1.x. This should not have cause any problems -- I haven't noticed any so far.

.pet package
1) Updated pinstall.sh so it checks to see if it is being called from puppy-unleashed or petget/pupget.

2) Added code to create /etc/cups/ppds/CUPS-PDF.ppd in keeping with what lpadmin does when adding a new printer.

3) Created install.sh which can be used to install the printer in other distros

4) Created documentation which is located in /usr/share/doc/pdf-writer.txt
pdf-writer-0.8.pet
Description 
pet

 Download 
Filename  pdf-writer-0.8.pet 
Filesize  14.14 KB 
Downloaded  679 Time(s) 
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Sun 14 Oct 2007, 00:27    Post subject:  

Version 0.9

Has two new options -- SHOW_LOCATION and FILE_MANAGER. These options give you the option to display a "Show location" location instead of just a notification. See attached images.

The first time you send job to print, pdf-writer tries to auto detect the file manager (FM). Currently it checks for the three "major ones" and rox in the following order rox, thunar (xfce), nautilus (gnome), konqueror (kde). If multiple FMs exists, the last one checked is use. ie nautilus supersedes rox and thunar. However, you can override the detected choice by specifying your preferred FM in the config.

This new option has successfully been tested on puppy and zenwalk. It works only for root with kde on pclinuxos 2007 and hasn't been test with gnome. I've tried ubuntu but just trying to get a printer installed is like trying to turn water into wine.

If someone can test with gnome and a different distro running that would be appreciated.

Some changes were made to the installation script to accommodate the ubuntu (possibly other debian) setups.

To test
1) Install with petget or via "tar xvfz pdf_writer-0.9.tar.gz -C /"
2) Remove your current config file "rm ~/.pdfwriter.conf"
3) Print any job to the CUPS-PDF printer to recreate the config file
4) Edit the config file and change SHOW_LOCATION to yes.
5) Change preferred FM if desired.

NB kde required special code to make it "kinda work", so it's possible that your preferred FM may not work out of the box.
pdf_writer-0.9.tar.gz
Description  Install with petget or via "tar xvfz pdf_writer-0.9.tar.gz -C /"
gz

 Download 
Filename  pdf_writer-0.9.tar.gz 
Filesize  3.48 KB 
Downloaded  670 Time(s) 
pdf-writer2.png
 Description   "Show location" notification
 Filesize   7.3 KB
 Viewed   1270 Time(s)

pdf-writer2.png

pdf-writer1.png
 Description   Standard notification
 Filesize   4.94 KB
 Viewed   1295 Time(s)

pdf-writer1.png

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 7 [96 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1248s ][ Queries: 13 (0.0131s) ][ GZIP on ]