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 Tue 16 Sep 2014, 05:49
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 3 of 7 [96 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7 Next
Author Message
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Wed 18 Jul 2007, 15:28    Post subject:  

disciple wrote:
I think it might be better for a print job to be deleted if you press cancel, than for it to stay in the queue and the printer to go off line. I think the current behaviour would be confusing to most users.


This is taken care of by this piece of code.
Code:
#if user choses not to save file, exit gracefully
if [ -z "$FILENAME" ]; then
        logger "pdf-writer: INFO: JOB $JOB aborted by $USER!"
        exit 0
fi


exit 0 tells cups that everything was completed successfully. During testing, (before I posted the script) I saw the problem and plugged it with that code. However, what I've since noticed is that if you enter a filename and hit enter instead of clicking ok, Xdialog segfaults producing the symptoms you have described. This too may be happening when you hit esc. I've added a check to abort the print if ok/cancel is not clicked.

disciple wrote:
Also, it would be handy to have a printer option to turn off the feature to add a date to prevent overwriting a file


I have modifed the printer so that if the file exists it ask you if you want to overwrite with a yes or no option. If the answer no, display they dialog again.

disciple wrote:
Printing from Firefox or Seamonkey I also have to specify the same size when I go to print it, otherwise it scales to the size specified by the browser, but puts it on the size paper specified by CUPS. How annoying. Why can't the browser dictate the paper size?


In Seamonkey/Firefox I can change the paper size by clicking the properties button next to the printer name. Unfortunately all programs don't have this option eg geany.

Thanks for all of your testing disciple
cupspdf-0.2.pet
Description 
pet

 Download 
Filename  cupspdf-0.2.pet 
Filesize  2.1 KB 
Downloaded  693 Time(s) 
Back to top
View user's profile Send private message 
disciple

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

PostPosted: Wed 18 Jul 2007, 19:11    Post subject:  

-
Last edited by disciple on Thu 19 Jul 2007, 01:03; edited 1 time in total
Back to top
View user's profile Send private message 
disciple

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

PostPosted: Wed 18 Jul 2007, 23:38    Post subject:  

--I'm testing the latest version, in a fresh 2.16.1 frugal install, with just the CUPS dotpup, XPDF and GTKLP installed--

The new overwrite behaviour is suberb. Thanks Smile

Quote:
This is taken care of by this piece of code.

On my system it isn't. If I press cancel when asked where to save it, the job stays in the queue and the printer gets stopped. The same thing happens if I press X to close the window - or do you mean that this code makes it behave like this, rather than preventing it? It would be much more user-friendly if somehow the job could just be deleted and the printer stay online.
Pressing enter instead of clicking OK works fine.

Apart from that it is absolutely great, and I can't get it to break or anything.
The only other enhancement I can think of is to not let a user click OK without putting in a name, but I don't know if this is even possible. At the moment if you are in /root/my-documents, it will make /root/my-documents.pdf, which is a little confusing.

-----------
Just because I like to document everything: If /usr/lib/cups/backend/pdf-writer gets deleted then you get the symptoms I reported before, where jobs will queue, but you never get asked where to save it. If you uninstall the .pet, then this will be deleted, but the printer will still appear to be on the system. (This is not why I initially had the problem, as that was before the .pet Smile)

-----------
Printing from browsers etc - that's interesting if it works for you - for me the printer properties from Seamonkey/Firefox scale what is printed, but don't actually change the papersize. Changing the page size from Openoffice just prints it at the size set by CUPS. I don't think it has anything to do with the PDF printer, I was just commenting on it. Another funny thing is that when you print from Seamonkey or Firefox, while it is preparing to print it has a window with a cancel button that doesn't actually cancel anything Smile
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Thu 19 Jul 2007, 09:36    Post subject:  

Barry,
lpadmin adds these lines to /etc/cups/printers.conf if its the first printer to be installed.

Code:
<DefaultPrinter CUPS-PDF>
Info CUPS-PDF
DeviceURI pdf-writer:/export/share/pdf/
State Idle
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>


If not, then the first line becomes
Code:
<Printer CUPS-PDF>


You should be able to just add those lines to /etc/cups/printers.conf to simiulate running lpadmin when creating the live-cd.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 19 Jul 2007, 19:47    Post subject:  

jcoder24, thanks for that info, yes, that would be an improvement.
I "froze" 2.17 last night, and won't make any further changes, even one as small as this. The way I did it is less efficient but works, and I have written down your improved method to be implemented for the next Puppy.
Back to top
View user's profile Send private message Visit poster's website 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Fri 20 Jul 2007, 18:01    Post subject: HP Drivers PET
Subject description: Where is the PET with HP drivers that make CUPS work?
 

In Barry's 2.17 Release Notes he mentions that the HPIJS drivers were moved to a seperate PET. The forum also suggests that this should be installed prior to running CUPS.

Can someone direct me to the PET as I cannot see it in the list of "Official PETs"? Thanks.

And also, IS there a preferred sequence for the installattion?
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Fri 20 Jul 2007, 20:46    Post subject: Re: HP Drivers PET
Subject description: Where is the PET with HP drivers that make CUPS work?
 

nic2109 wrote:
Can someone direct me to the PET as I cannot see it in the list of "Official PETs"? Thanks.

And also, IS there a preferred sequence for the installattion?

Yes it is, I just checked. Click the 'install' button on the desktop, then follow your nose from there, and there it is in the left pane.

Install the hpijs package, then choose Setup --> CUPS printer wizard.
Back to top
View user's profile Send private message Visit poster's website 
disciple

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

PostPosted: Fri 20 Jul 2007, 21:43    Post subject:  

Oh. In my Grafpup install if I click cancel the job is cancelled and the printer is not stopped, so it is just my install of 2.16 that has problems. Oh well.
Back to top
View user's profile Send private message 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Sun 22 Jul 2007, 06:59    Post subject: Re: HP Drivers PET
Subject description: Where is the PET with HP drivers that make CUPS work?
 

BarryK wrote:
nic2109 wrote:
Can someone direct me to the PET as I cannot see it in the list of "Official PETs"? Thanks.

And also, IS there a preferred sequence for the installattion?

Yes it is, I just checked. Click the 'install' button on the desktop, then follow your nose from there, and there it is in the left pane.

Install the hpijs package, then choose Setup --> CUPS printer wizard.


Er...... this is odd since it's not there for me. Is there something to do first to refresh the list of packages?

I tried MU's PSI and there it is, but that does have a "Do you want to refresh the list?" dialogue first.

As usual with new/nervous users my assumption is that I have done something wrong (or failed to do something right) but what might that be?
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 22 Jul 2007, 09:23    Post subject: Re: HP Drivers PET
Subject description: Where is the PET with HP drivers that make CUPS work?
 

nic2109 wrote:
BarryK wrote:
nic2109 wrote:
Can someone direct me to the PET as I cannot see it in the list of "Official PETs"? Thanks.

And also, IS there a preferred sequence for the installattion?

Yes it is, I just checked. Click the 'install' button on the desktop, then follow your nose from there, and there it is in the left pane.

Install the hpijs package, then choose Setup --> CUPS printer wizard.


Er...... this is odd since it's not there for me. Is there something to do first to refresh the list of packages?

I tried MU's PSI and there it is, but that does have a "Do you want to refresh the list?" dialogue first.

As usual with new/nervous users my assumption is that I have done something wrong (or failed to do something right) but what might that be?

hpijs is in the list if you are running 2.17. If not, you will have to go to ibiblio and download the hpijs PET package, then just click on it -- well, just clicking on it in the ibiblio site, seamonkey will offer to download or install it directly.
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Sun 22 Jul 2007, 10:03    Post subject:  

Quote:
"Do you want to refresh the list?


You mean the initial question when you start PSI?
If the hp package is not listed, then you must confirm to refresh the list.
I run a serverside script maybe once a month to get the current list of Barrys packages in PSI.
I just updated it yesterday.
To see the latest packages, you must confirm to refresh the list.

PSI offers this question, because all those lists are quite huge, and might take some minutes to download on a dialup-connection (with ADSL it takes only some seconds).
Mark
Back to top
View user's profile Send private message Visit poster's website 
nic2109

Joined: 01 Jan 2007
Posts: 406
Location: Hayslope, near Middlemarch, Midlands, England

PostPosted: Sun 22 Jul 2007, 17:30    Post subject: CUPS and HPIJS
Subject description: Installing Packages
 

Quote:
Barry K wrote : hpijs is in the list if you are running 2.17.


I thought that was what I was running, but clearly not as booting afresh with pfix=ram gives a different list of packages - including hpijs!

So, the screw-up fairy has visited me again and I've fouled up my installation. As that's a different topic I'll create a new thread in a more appropriate area.

Thanks for the responses everyone.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Tue 31 Jul 2007, 10:49    Post subject:  

Version 0.3

Bug fixes
1) Fixed a minor bug (introduced in version 0.2) where if you canceled a job it still saved it as the hidden file /root/.pdf

Changes
1) pinstall.sh now adds the printer directly to /etc/cups/printers.conf instead of using lpadmin. This should work for both puppy-unleashed and petget.

New features
1) Remembers last directory used (via config file $HOME/cupspdf.conf).
2) Supply the filename presented to CUPS (if any) as the default filename. For apps that send jobs with filename 'stdin', no default filename is supplied. NB the filename used has all spaces converted to underscores and all other non-alphanumeric characters are dropped. If I can figure out how it get it to generate a file name with spaces that would be added to a future version.
cupspdf-0.3.pet
Description 
pet

 Download 
Filename  cupspdf-0.3.pet 
Filesize  2.69 KB 
Downloaded  629 Time(s) 
Back to top
View user's profile Send private message 
disciple

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

PostPosted: Fri 03 Aug 2007, 21:25    Post subject:  

Very Happy It just keeps getting better.

This one's even better and my 2.16 is fixed now. It would be superb if you could handle the spaces, as again that could get people confused, as you get the same behaviour as before - the printer is "turned off", but also it resets the last directory to /

Even if it just refused to accept filenames with spaces it would be better.

Are you sure the configuration file shouldn't be a hidden file?

----------
It's funny how easy it is to miss bugs like that one - I didn't even notice it until just before you fixed it.
Back to top
View user's profile Send private message 
jcoder24


Joined: 06 May 2005
Posts: 601
Location: Barbados

PostPosted: Fri 03 Aug 2007, 23:50    Post subject:  

Thanks for reminding me about the spaces (i've just fixed it in the new version). Below is a list of what's different in version 0.4. 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. Just extract the files from the .pet as if it were a tar.gz and copy over to the 1.xx version.

New features
1) Print job completion notification via (config file)
2) Run in a console-only setup (via config file)

Changes
1) Config file is now a hidden file
2) Reorganized code to better accommodate console only option

Sanity check
3) Remove any invalid characters in the filename entered by the user

I have some more testing to do then I'll upload the update. I think this is getting to a stage where I'll have to put together a feature list and a small manual for this package and maybe a configuration gui.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 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.1007s ][ Queries: 13 (0.0059s) ][ GZIP on ]