Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2020 17:22:56 -0600 (MDT)
From:      Dale Scott <dalescott@shaw.ca>
To:        Jordan <freebsd@jdev.sent.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>,  Polytropon <freebsd@edvax.de>
Subject:   Re: PDF Documents Manipulation Software options
Message-ID:  <1584212720.148023480.1587597776062.JavaMail.zimbra@shaw.ca>
In-Reply-To: <b9eab5c4-0619-4d9d-ba05-7ac3ec24bfaa@www.fastmail.com>
References:  <09e273ff-4d9d-47eb-a6e1-d91f18c8a0ef@www.fastmail.com> <20200423002530.87cf0d91.freebsd@edvax.de> <b9eab5c4-0619-4d9d-ba05-7ac3ec24bfaa@www.fastmail.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Have you looked at PDFtk? It's in the ports collection and claims to be a Java equivalent of PDFtk.

IIUC, PDFtk is a product from PDFLabs (https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/), who also provide a CLI tool ("PDFtk Server") with source which you may be able to compile on FreeBSD.

Fwiw, my usual desktop is Windows and I use "PDFTK-Builder" (a Windows GUI app) to do what you want "manually" (extract pages from various PDFs and merge to create a new PDF), which seems to be a Windows GUI with PDFtk Server underneath. However, I recall needing to use the CLI PDFtk Server directly once because PDFTK-Builder didn't expose a command-line switch I needed.

Good luck! Write back and tell us what you ended up doing.

Cheers,
Dale

--- 
Dale Scott 
Engineering and NPI Leader 
Web: www.dalescott.net 


----- Original Message -----
> From: "Jordan" <freebsd@jdev.sent.com>
> To: "freebsd-questions" <freebsd-questions@freebsd.org>
> Cc: "Polytropon" <freebsd@edvax.de>
> Sent: Wednesday, April 22, 2020 4:50:03 PM
> Subject: Re: PDF Documents Manipulation Software options

> Hi Polytropon,
> 
> Thank you for the response.
> 
> I agree, manually manipulating PDFs with a GUI is not very efficient, however,
> the work I do cannot be automated (atleast I haven't found a way).
> 
> On a PDF I may have to extract out pages 3, 5 and 14 into a new 3 page PDF
> because I only need the data from pages 3, 5 and 14.  The very next PDF file I
> work on I may need to extract out 20 pages, all in a row, from pages 20 to 40.
> The next PDF file I may need the first and last page.  There is absolutely no
> common denominator from these three PDF's and the only thing common is that I
> need to extract pages.
> 
> In other words, I cannot write a script or use CLI to know ahead of time what
> needs to be done, because it takes my eyes to visually see the pages and to
> know what pages I need extracted.  I cannot use grep or any text searching
> function on these PDFs because on one PDF I may need certain pages that contain
> words that have absolutely nothing to do with the pages I need on the next PDF
> I work on.  So, very unfortunately, this is a very manual job and requires
> human beings (again, from my knowledge of CLI, scripting, etc).
> 
> Using CLI would require me to visually look with my eyes a PDF file in a GUI
> situation and then turn around, open a console, type in a command to extract
> out a list of specific pages I need to then have to turn around and move that
> newly created PDF file to a difference location that may be nested 30 folders
> deep (and won't be consistent location as the next PDF I work within).  It is
> easier to visually click, hold CTRL to continue highlighting pages and then
> right click, extract (which creates a new PDF) and then drag and drop the new
> PDF pages into a GUI file manager (such as Thunar) to create the new PDF.
> 
> I don't see how CLI tools will work with the above example workflows although I
> am all ears to hearing others opinions.  I know "professional" PDF software
> such as Adobe Acrobat Pro works but it is only compatible with Windows (and
> maybe GNU/Linux). I found another proprietary PDF Professional software but it
> is only available for Windows, Mac and GNU/Linux.  I am on a quest to find
> something for FreeBSD as I believe it to be superior OS than the
> aforementioned.
> 
> --
> Jordan
> 
> On Wed, Apr 22, 2020, at 3:25 PM, Polytropon wrote:
>> On Wed, 22 Apr 2020 15:14:59 -0700, Jordan wrote:
>> > I need PDF software that can add pages, remove pages, extract pages
>> > and redact.
>> 
>> With "redact", you're refering to PDF annotations?
>> 
>> 
>> 
>> > All of the PDF ports I have found are simply viewers and don't allow
>> > manipulations of the PDF in a single packaged GUI application. I work
>> > with hundreds of PDFs each day so I cannot work within a CLI to
>> > manipulate the pages.
>> 
>> I'd say the exact opposite is the case: If you're going to deal with
>> a lot of files, using CLI tools to automate those tasks usually is
>> the more convenient way - instead of doing everything manually in
>> linear time. :-) But this of course depends on many parameters, such
>> as if the kind of manipulation always is "one of a kind" or can be
>> somehow standardized...
>> 
>> 
>> 
>> > I do a lot of extracting of pages into a new PDF by dragging and
>> > dropping pages from PDF software to a GUI file manager such as
>> > Thunar.
>> 
>> This can easily be done with the GUI file manager of your choice
>> plus pdftk. Page preview support is present already in tools like
>> Thunar.
>> 
>> 
>> 
>> > Any suggestions that you use or have heard that works with FreeBSD?
>> 
>> Tools like LibreOffice (and surely also OpenOffice) can directly
>> open and manipulate PDF files. Gimp also has support for this
>> format. For CLI operations, pdftk and ImageMagick are versatile
>> tools that can be combined with GUI tools as well as used for
>> batch operations.
>> 
>> Is this a starting point for you?
>> 
>> 
>> 
>> --
>> Polytropon
>> Magdeburg, Germany
>> Happy FreeBSD user since 4.0
>> Andra moi ennepe, Mousa, ...
>>
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1584212720.148023480.1587597776062.JavaMail.zimbra>