PeasyPDF Convert/Join/Extract/Print

Word processors, spreadsheets, presentations, translation, etc.
Post Reply
Message
Author
User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

PeasyPDF Convert/Join/Extract/Print

#1 Post by rcrsn51 »

PeasyPDF is a little program for manipulating PDF files. Look for it in the menus under Document. The easiest way to use PeasyPDF is to run it in one window, with the folder containing your source documents in another. Then drag files between the windows.

If you have problems, look in the log file /tmp/peasypdf.log for any error messages.

----------------------------------

The Convert tool converts JPEG, PNG and TIFF graphic files into PDFs. Use this if you have a single photo or scanned image that you need to package as a PDF. Other graphic formats can be converted by first opening them in mtPaint and saving as a PNG.

Text documents or spreadsheets can be converted to PDF by loading them into their default application and using Print > Print to File.

The Custom page size makes a PDF page with the exact dimensions of the graphic, so it is borderless. No other options are required with this setting.

PeasyPDF v3.7 has two new Custom sizes. If the original graphic has low resolution, the resulting PDF will be small and may require zooming in your PDF viewer. The Custom+ setting increases the initial size of the PDF. Similarly, the Custom- size shrinks a PDF made from a hi-res image that may overflow the screen.

The Landscape option turns the PDF page sideways so a landscape image will fit in its proper orientation. Use this in conjunction with a standard page size like Letter.

Use Turn if you want to fit a landscape image onto a Letter PDF page with regular portrait orientation.

--------------------------------------

The Join tool combines separate PDFs into a single document or adds more items to an existing PDF.

1. Click New. This starts a new project in the folder /tmp/PDFJoin.

2. Select a PDF file and click Add. You can:

a. select it through the file chooser dialog.
b. drag a file directly from a ROX window into the file entry box.

3. Repeat Step 2 for all the source files.

4. When done adding files, click Join.

5. Click View to open the project folder in a separate ROX window. The joined file is named PROJECT.PDF. Copy it to a permanent location and rename it.

The project folder also contains the original files numbered sequentially. They will remain until you click New. So if you want to add another file to the project, just use Add and Join again. Or move to a different source folder and add more files from there.

Hint: To join a batch of PDFs in one step, read here.

Hint: The Join function uses Ghostscript, which can be slow. You may prefer to use the pdfunite tool instead.

1. Open /usr/sbin/peasypdf in a text editor.
2. Comment out line 147 and insert a line below:

Code: Select all

#gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=$JOINPATH/PROJECT.PDF $JOINPATH/*.pdf
pdfunite $JOINPATH/*.pdf $JOINPATH/PROJECT.PDF
--------------------------------------

The JPEG section has two procedures for combining a batch of JPEG photos into a single PDF document.

1. Use the img2pdf tool. It is FAST, but requires Python. Download img2pdf here. Click the small green DOWNLOAD box. Tahrpup already has basic Python, otherwise get it here. Img2pdf is a one-step procedure. The JPEGs are directly combined into the file /root/JPEG2PDF.PDF. You may need to try different DPI values to get an acceptable PDF.

2. Use the tiff2pdf tool. It just needs some additional TIFF components from the package here. Tiff2pdf is a two-step procedure. The JPEGs are first converted to PDF format in /tmp/PDFJoin, then combined into the file /root/JPEG2PDF.PDF.

Update: V4.2 also handles PNG and TIFF files. It uses image-changer from PeasyScale.

Hint: If you need to change the orientation of an image, like from landscape to portrait, rotate it in PeasyScale before converting to PDF.

--------------------------

The Extract tool pulls one or more pages from a PDF file and converts them to JPG or PNG images. You can also save in PDF format. See below.

Select the PDF file and enter the page number. You can also specify a list of numbers and/or page ranges, like:

Code: Select all

1 4 9 16-25 36 49-64 81 100
You can also extract pages from a PDF without knowing the document length. For example, you can extract the entire document just by selecting pages "1-".

The extracted files are stored in the folder /tmp/PDFExtract. Click View to see it. Use the Clear button to erase the PDFExtract folder before starting another set of extractions.

If you extract to PDF format, you have two choices:

a. If you do NOT check Combine, the individual pages are extracted and stored in /tmp/PDFExtract.

b. The Combine option ONLY works with page ranges. The set of pages are extracted and made into a single PDF file. Click View to see it.

PeasyPDF v2.3 can now extract the text from a PDF document. The text is saved in the temporary folder /tmp/PDFExtract under the name EXTRACTED.TXT.

--------------------------------

The Print tool sends a PDF directly to a CUPS printer. Use this instead of Puppy's default PDF viewer program, which does not always print correctly.

You can print the entire document, a single page or a page range like 2-10 or 25-.

------------------------------

PeasyPDF has optional support for MuPDF. MuPDF is a fast, accurate PDF viewer that may work better than your regular viewer. Download it here. Click the small green DOWNLOAD box.

MuPDF uses keyboard controls. There is a list of basic controls under the MuPDF tab.

If you like MuPDF, you can make it your default viewer. Right-click on a PDF file and choose Set Run Action. Change the command to

Code: Select all

mupdf  "$1"
--------------------------

Update: For a simple PDF annotating tool, see the discussion about Xournal on page 5.

----------------------------

Here are some examples:

You have a 10-page PDF file. You just want to delete the first page.

a. Choose Extract with the format PDF+Combine
b. Select the page range 2-.
c. Click View to see the new PDF.

You have a PDF file. You want to build a new PDF that combines some of the original pages with some of your own.

a. Choose Extract with the format PDF, but do NOT combine.
b. Extract the pages you want.
c. Click View to open the PDFExtract folder.
d. Click the main Join tab and start a new project.
e. Drag pages from the PDFExtract window into the project and add them. Insert your own pages as needed.
f. When done, join them.

You have a 200-page PDF and you want to insert another item after page 100.

a. Extract pages 1-100 using PDF+Combine.
b. Extract pages 101-200 using PDF+Combine.
c. Click View.
d. Start a new Join project.
e. Add the "001-100.pdf" file.
f. Add the additional page.
g. Add the "101-200.pdf" file.
h. Join the three items.

----------------------------
Attachments
peasypdf-4.2.pet
Updated 2017-10-15
Changes to tiff2pdf conversion tool
(6.19 KiB) Downloaded 1017 times
screenie.png
(23.75 KiB) Downloaded 4328 times
Last edited by rcrsn51 on Tue 18 Dec 2018, 12:07, edited 219 times in total.

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

#2 Post by disciple »

Hey - do you add your guis to the list of programs using gtkdialog?

Also, people might be interested in my old gui for joining pdfs, including recursively finding and joining them http://www.murga-linux.com/puppy/viewtopic.php?t=22978
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#3 Post by jpeps »

I guess this is the correct thread to post in

http://murga-linux.com/puppy/viewtopic. ... 9&start=24

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

Re: Announcing PeasyPDF

#4 Post by 01micko »

rcrsn51 wrote: PeasyPDF uses Ghostscript and works better with newer versions. Wary/Racy/Slacko all have an obsolete version of Ghostscript, so some files cannot be converted properly.

There is a Ghostscript upgrade for the above Puppies to v8.64 here.
OK, wasn't aware of the updated ghostscript even though the latest Slacko alpha ships with the Peasy* line of progs.

Do you see this as a drop in replacement?

Thanks
Puppy Linux Blog - contact me for access

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Announcing PeasyPDF

#5 Post by rcrsn51 »

01micko wrote:OK, wasn't aware of the updated ghostscript even though the latest Slacko alpha ships with the Peasy* line of progs. Do you see this as a drop in replacement?
In Puppy, the primary role of Ghostscript is for printing - it converts Postscript data from an app into raster data for the printer driver. Since printing still works in Puppies that have the old GS 8.15, it appears to be good enough. In the places where printing is a problem, it's because of the old CUPS version.

However, most modern apps have switched from PS to PDF as the data format for printing work-flow. So it's not clear how well the old GS is coping.

In PeasyPDF, I found many cases where a newer GS was required to process PDF files. I did some print tests in Slacko with the new 8.64 and it looked OK. But it was a small sample. So I'm not going to swear that it's a drop-in replacement.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#6 Post by 01micko »

So I'm not going to swear that it's a drop-in replacement.
Ok, thanks.

If people have issues then at least this package is available. I might upload to Slacko repo under a different name "gostscript_newer" with a modified description or something so it doesn't conflict with the original when building from woof.

Cheers
Puppy Linux Blog - contact me for access

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#7 Post by rcrsn51 »

Why does Slacko not have the official Slackware GS package? Lupu has its native version, so PeasyPDF works better in it.

Was this a space issue?

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#8 Post by 01micko »

Why does Slacko not have the official Slackware GS package?
Oversight, fixed.

EDIT:.. Hmm.. Slackware's is rather large, I'll check the size once split into doc,dev,nls
Puppy Linux Blog - contact me for access

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

Some ideas for a next version of PeasyPDF

#9 Post by Dromeno »

I like PeasyPDF better than PuppyPDF because it generates better quality PDFs. But allow me to add a few requests for a future edition:

- option to drag a selection of several JPGs or other image files to a box for a quick conversion in a single click

- a batch option to convert a directory full of JPGs or other image files into PDFs quick

- a possibility to add "convert to PDF" in the rox context menu (right click) for pdf-convertable files. Also for dirs (add all files in this directory to pdf)

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

#10 Post by charlie6 »

Hi rcrns51 !
many ... hmm...let's say a TON of thanks for this peasypdf ... i'm using it now regularly ... it prevent me from sam2p's command line operation (which i also like) with substential time saving ! :)
i also much appreciate the resolution size choice --> to save memory.
cheers, charlie

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

Puppy OMR

#11 Post by Dromeno »

I hope you don't mind if I toss in another request here.

It would be nice if a jpg or pdf of sheet music also could be converted to a .mscz (MuseScore) file

http://wiki.musichackday.org/index.php? ... PDF_import

It seems to be possible by using Audiveris (kind of tesseract for sheet music) but there is no Audiveris version for puppy yet

http://audiveris.kenai.com/

User avatar
vtpup
Posts: 1420
Joined: Thu 16 Oct 2008, 01:42
Location: Republic of Vermont
Contact:

#12 Post by vtpup »

Great program! Thank you.

Feature request:

When converting a batch of sequentially numbered named files, the old problem of decimal sequences shuffles the pages in the output .pdf.

In other words files named 30.jpg will get shuffled with a file named 3.jpg in the final pdf.

Any chance of allowing normal decimal numbering for file names?

Thanks!
[color=darkblue]Acer Aspire 5349-2635 laptop Tahrpup.[/color]
[color=blue]Acer R11 and C720 Chromebks Bionicpup64[/color]
[color=olive]Acer Iconia A1-830 tablet no pup[/color]
[color=orange]www.sredmond.com[/color]

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#13 Post by rcrsn51 »

vtpup wrote:In other words files named 30.jpg will get shuffled with a file named 3.jpg in the final pdf.
???

When you run PDF Builder, the files you add to the project are temporarily named 001.pdf, 002.pdf, etc. So they are merged into the final project in the correct order.

Or are you selecting the files using a wildcard like *.jpg? Instead, use ?.jpg followed by ??.jpg.

Or use Ctrl-A to select all the files, then drag them into the project. That method may preserve the order.

Or you could rename 3.jpg as 03.jpg.

User avatar
charlie6
Posts: 1230
Joined: Mon 30 Jun 2008, 04:03
Location: Saint-Gérard / Walloon part of Belgium

peasypdf-2.4 french translation

#14 Post by charlie6 »

Hi rcrsn51 !
a ton of thanks for this awesome app !
here is a french translation
(... managed to keep the strings as short as possible :) ).

in attachment:
both peasypdf.mo and if usefull, peasypdf.po files

Cheers, Charlie
Attachments
20130416peasypdf_french_dotmo.tar.gz
extract to get both peasypdf.mo and if usefull, peasypdf.po files
(2.34 KiB) Downloaded 1633 times
PeasyPDF.desktop.fr.gz
french desktop file: drop the fake «.fr.gz » extensions; to be placed in /usr/shate/applications
(259 Bytes) Downloaded 1649 times
capture18118.jpg
(21.86 KiB) Downloaded 9927 times

Snail
Posts: 331
Joined: Sun 18 Oct 2009, 07:32

Suggestion for handling backed documents

#15 Post by Snail »

Hi,

Thanks for a really useful application. May I make a feature suggestion? Not vital, but it could be useful.

Some scanners with autofeed are not sophisticated enough to handle backed documents. You end up with all the odd pages, then all the even ones. It would be good if there was a "merge like a zip" option for the combine process, to handle that situation.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#16 Post by rcrsn51 »

Which scanner program are you using? Peasyscan can already combine the pages from a batch ADF scan into a PDF.
"merge like a zip"
Please explain.

Snail
Posts: 331
Joined: Sun 18 Oct 2009, 07:32

Merge like a zip

#17 Post by Snail »

I haven't got access to a personal scanner at present, so I haven't been using my own software. So I'm not familiar with peasyscan. Maybe the capability is there already, in which case my request is redundant.

When I want scanning done, I have to go to a copyshop. Their scanners always have ADF and usually I get one multipage PDF back. However, in many cases, it seems that their machines don't have the capability to handle backed originals properly. So it is a case of run through and scan the odd numbered pages, then flip the stack over and do the even ones. Either the operators do not know how to correct this in software or the language barrier is at fault. Hence my request to combine the even file with the odd file taking a page from each file alternately, i.e. "merge like a zip"

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#18 Post by rcrsn51 »

So the copy shop is giving you two PDF files - one with the even pages and one with the odd pages?

I still don't understand what you mean by "merge like a zip". Or do you mean "merge like a zipper"?

How are you currently handling this situation? Are you extracting the pages from the two PDFs, then building a combined document?

Snail
Posts: 331
Joined: Sun 18 Oct 2009, 07:32

Merge like a zip

#19 Post by Snail »

rcrsn51 said:
So the copy shop is giving you two PDF files - one with the even pages and one with the odd pages?
That's right.

rcrsn51 said:
I still don't understand what you mean by "merge like a zip". Or do you mean "merge like a zipper"?
That's the Atlantic and Pacific language barrier. "Zipper" is the North American English word. Elsewhere in the world, "zip" is used for the same item. I meant that the two files would be merged by taking a page at a time alternately from the "odd page" and the "even page", thus ending up with all in the correct order.

rcrsn51 said:
How are you currently handling this situation? Are you extracting the pages from the two PDFs, then building a combined document?
Not really handling it at all. It would be such a hassle to fix manually that I just open both files and jump between them as I read.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#20 Post by rcrsn51 »

.......

No feedback. Message deleted.
Last edited by rcrsn51 on Sat 17 Aug 2013, 03:34, edited 1 time in total.

Post Reply