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 Mon 01 Sep 2014, 20:47
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Documents
Announcing PeasyP2J
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Author Message
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Fri 25 May 2012, 18:52    Post subject:  Announcing PeasyP2J  

Update: PeasyP2J has now been incorporated into PeasyPDF.
Last edited by rcrsn51 on Wed 30 May 2012, 01:49; edited 15 times in total
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Fri 25 May 2012, 21:36    Post subject:  

Exprimo is using ghostscript 8.71. Current version is 9.05.


command line way (for whole doc, leave out FirstPage/LastPage):

Code:

gs -dNOPAUSE -sDEVICE=jpeg -r144 -dFirstPage=12 -dLastPage=12 -sOutputFile=p%03d.jpg file.pdf

Last edited by jpeps on Fri 25 May 2012, 22:26; edited 1 time in total
Back to top
View user's profile Send private message 
davids45


Joined: 26 Nov 2006
Posts: 647
Location: Chatswood, NSW

PostPosted: Fri 25 May 2012, 22:12    Post subject:  

G'day rcrsn51,

A nice utility.

Using Slacko-5.3.3 as-was, converted OK a pdf made by CUPS-PDF and pages from a printer manual taken off the manufacturer's CD-ROM.
But then had a failure to get jpgs from a downloaded pdf manual for an espresso coffee machine.
So I downloaded the new ghostscript version you provided the link to, installed this into Slacko-5.3.3, and PeasyP2J now works with this pdf as well.

Changing the dpi and re-doing the same page gave no warning about over-writing the original jpg file, but as it all works so quickly, such a warning is probably unnecessary - just do it again until I'm happy with the image, or manually rename the previous file if I need to keep it as well.

Thanks for the pet,

David S.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Fri 25 May 2012, 22:27    Post subject:  

davids45 wrote:
So I downloaded the new ghostscript version you provided the link to, installed this into Slacko-5.3.3, and PeasyP2J now works with this pdf as well.

Thanks for testing this.
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Sat 26 May 2012, 08:46    Post subject:  

Dear puppians,

Here is a variation that produces png files and can handle transparency. If rcrsn51 wants to add it to his little gem of a program, fine, otherwise it also works standalone.

With kind regards,
vovchik
peasyp2p.tar.gz
Description 
gz

 Download 
Filename  peasyp2p.tar.gz 
Filesize  1008 Bytes 
Downloaded  279 Time(s) 
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Sat 26 May 2012, 09:36    Post subject:  

vovchik wrote:
Here is a variation that produces png files and can handle transparency.

Excellent! I have packaged your PNG features as a separate PET based on my cleaned-up version 1.2. Could you give it some tests? The transparency option appears to be working.
peasyp2p-1.2.pet
Description 
pet

 Download 
Filename  peasyp2p-1.2.pet 
Filesize  1.35 KB 
Downloaded  291 Time(s) 

Last edited by rcrsn51 on Sat 26 May 2012, 21:38; edited 3 times in total
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 26 May 2012, 11:00    Post subject:  

Why limit it to one page? It would be trivial to let it include any or no limiter (eg, 4-7) for page selection.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Sat 26 May 2012, 11:31    Post subject:  

jpeps wrote:
Why limit it to one page? It would be trivial to let it include any or no limiter (eg, 4-7) for page selection.

While that feature is certainly possible, I can't see the practical value. I believe that people would use this program to extract a single interesting image from a PDF document. I can't envision a scenario where I would want to turn an entire PDF into single JPEGs.

See the discussion here.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 26 May 2012, 12:06    Post subject:  

I suppose something like converting a few pages of graphs for posting to a forum or loading as pix on a device (cellphone, etc, vs loading a pdf reader) might be useful.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Sat 26 May 2012, 14:05    Post subject:  

jpeps wrote:
I suppose something like converting a few pages of graphs for posting to a forum or loading as pix on a device (cellphone, etc, vs loading a pdf reader) might be useful.


Oh, OK. Wink

See the new instructions above for entering a list of pages.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 26 May 2012, 14:42    Post subject:  

rcrsn51 wrote:

Oh, OK. Wink

See the new instructions above for entering a list of pages.


Smile works nicely, thanks. To be traditional, you could include a page span with "-" , and separate pages with "," (or you can just leave it the way it is Smile (might as well use ghostscript's Firstpage/LastPage function)
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 27 May 2012, 03:04    Post subject:  

Version that adds page span; ex: 4-7
peasyp2j.tar.gz
Description 
gz

 Download 
Filename  peasyp2j.tar.gz 
Filesize  1.06 KB 
Downloaded  281 Time(s) 
Back to top
View user's profile Send private message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Tue 29 May 2012, 07:19    Post subject:  

Thanks for this it works great Smile

One thing I did notice is that the pdf source file needs to contain no spaces in its title overwise you fails to work.
Back to top
View user's profile Send private message 
rcrsn51


Joined: 05 Sep 2006
Posts: 9066
Location: Stratford, Ontario

PostPosted: Tue 29 May 2012, 11:24    Post subject:  

chrome307 wrote:
One thing I did notice is that the pdf source file needs to contain no spaces in its title overwise you fails to work.


Fixed! See Version 1.3. Please test and report.

I have also included the code for selecting ranges.
Back to top
View user's profile Send private message 
chrome307


Joined: 15 Jan 2009
Posts: 713

PostPosted: Tue 29 May 2012, 15:08    Post subject:  

Thanks again for the update and great work Smile

A simple idea but so useful, stops me having to upload whole documents when I can just send some a page( s ) from a pdf.

As and afterthought had you considered adding a jpeg library to this application eg libjpegturbo that could speed up the compression/decompression process?

http://libjpeg-turbo.virtualgl.org/

libjpeg-turbo is a derivative of libjpeg that uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems. On such systems, libjpeg-turbo is generally 2-4x as fast as the unmodified version of libjpeg, all else being equal.

It's just a thought!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Documents
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.0827s ][ Queries: 12 (0.0151s) ][ GZIP on ]