Jump to content

Alfred PDF Tools – Optimize, encrypt and manipulate PDF files


Recommended Posts

Alfred PDF Tools

A workflow for Alfred 3.


Description

Optimize, encrypt and manipulate PDF files.


Download and Installation

Download the workflow file from GitHub releases and install it by double-clicking on Alfred PDF Tools.alfredworklow.


Usage

Alfred PDF Tools can be used by the following file actions:

  • Optimize: Optimize the selected PDF files by entering the intended resolution of the output file (150 dpi is set once no value is input). The document will be improved on the process with increased contrast and text straightening. Invoke Alfred and type the keyword progress if you want to track the optimization process;
  • Encrypt: Encrypt the selected PDF files by entering a password;
  • Decrypt: Decrypt the selected PDF files by entering their password or just  if they're not password protected;
  • Merge: Merge the selected PDF files. Use the modifier key if you also want to move the source files to Trash;
  • Split by Page Count: Split the selected PDF file by page count.
  • Split by File Size: Split the selected PDF file by file size.
  • Slice in Multiple Files: Slice the selected PDF file in multiple files by entering page numbers and/or page ranges separated by commas (e.g. 2, 5-8).
  • Slice in a Single File: Slice the selected PDF file in a single file by entering page numbers and/or page ranges separated by commas (e.g. 2, 5-8).
  • Crop: Convert two-column pages in single pages.
  • Scale: Scale the selected PDF files to a given paper size.

 

Contribute
To report a bug or request a feature, please create an issue or submit a pull request on GitHub.


Credits
This workflow relies on PyPDF2 library currently maintained by Phaseit, Inc., Alfred-Workflow library by Dean Jackson, K2pdfopt by Johannes Buchnerand, Send2Trash by Virgil Dupras and docopt.  The code for the `Crop` file action  was mostly created by Matt Gumbley (Stack Overflow) and changed by Hanspeter Schmid to deal with already cropped pages.


License
Alfred PDF Tools code is released under the MIT License.

Edited by xilopaint
Link to post
  • Replies 81
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Alfred PDF Tools A workflow for Alfred 3. Description Optimize, encrypt and manipulate PDF files. Download and Installation Download the workflow file from GitHub releases a

OMG! Love it!!!!!! TY so much <3

Oh nice, I actually just posted on the other workflows GitHub seeing if 2016 support was possible and he said no.   I agree that it isn't really a good fit for APT I was just naming features

Posted Images

32 minutes ago, alwaysaugust said:

I have set my keywords and see the action in Alfred but it does nothing to the pdf files I select in the finder before invoking Alfred. What am I doing wrong? Thanks for any help.

 

You should not set any keyword or do any other change to make the workflow work. Revert back your changes or reinstall the workflow. Alfred PDF Tools is fully operated by file actions, so you just have to select one or more PDF files with Alfred, depending on the chosen action, and enter the user input once requested. The keyword elements are intended to get user input, not to trigger the action.

Edited by xilopaint
Link to post
On 4/21/2017 at 0:23 PM, 2pilvic said:

Could make the flow to accept multiple files? Thanks you 

 

I have concerns regarding the stability. In larger files the workflow needs more time to complete the encryption process so a batch encryption could not be as stable. In any case I will consider your request and make some tests to check if this can be implemented in a reliable way.

Edited by xilopaint
Link to post
1 hour ago, alwaysaugust said:

Thank you, I am new to Alfred and was not properly selecting the files to invoke Alfred and your workflow. Thanks so much this is just what I needed.

 

No problem. Feel free to ask any question or request a feature.

Edited by xilopaint
Link to post
15 hours ago, alwaysaugust said:

Can you explain the step part of the input when slicing? Can I split a 10-page pdf into 3 ranges like 1-2 3-4 5-8 and get 3 files with a single input argument?

 

If you enter 1,20,1 for start, stop, step you will have all pages from 1 to 20 of the source file.


If you enter 1,20,2 you will include the start page and every page after a step of two pages so you will have in the output file the following pages of the source file: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19.

 

If you enter 1,20,4 you have a step of four pages so the output file will have the following pages of the source file: 1, 5, 9, 13, 17. Note that the difference between the pages is equal to the step value (eg. 5 - 1 = 4; 9 - 5 = 4 and so on).

 

15 hours ago, alwaysaugust said:

Can I split a 10-page pdf into 3 ranges like 1-2 3-4 5-8 and get 3 files with a single input argument?

 

No. According the workflow logic a split should involve all pages of the source file. You are mentioning a multiple slice invoked by a single input argument. This is not supported by Alfred PDF Tools and I am not certain it would be a useful feature. Personally, when I need to do this I prefer to use Finder for dragging the pages in order to create multiple documents.

Edited by xilopaint
Link to post

My use case is I get pages of invoices which can range from 1-4 pages each within the larger 10-15 page pdf. I only need to keep/process some of them so I usually look at the page numbers I need like 1,2,4-5,6,8-10,13 and then use ilovepdf.com's split tool to set up the needed ranges and it pops x number of files in a zip (annoying part I hate the zip).

 

What I was hoping APT could do was take an arguement like "slice 1,2,4-5,6,8-10,13" and have it spit out the 6 files into the source directory with some default naming scheme that includes the pg numbers for reference. Potenitally with an aruguement like "slice 1,2,4-5; [single:multi]" where multi slices into 3 files and single slices out the input pages and then combines those 3 files back into a single pdf.

 

I understand this is a limited need function. I really appreciate your tool and communication.

Link to post
18 minutes ago, alwaysaugust said:

What I was hoping APT could do was take an arguement like "slice 1,2,4-5,6,8-10,13" and have it spit out the 6 files into the source directory with some default naming scheme that includes the pg numbers for reference. Potenitally with an aruguement like "slice 1,2,4-5; [single:multi]" where multi slices into 3 files and single slices out the input pages and then combines those 3 files back into a single pdf.

 

It sounds interesting. I will look into this in the coming weeks.

Link to post

The only other thing I used to use from there I found in another Alfred Workflow but could be useful in your workflow which is Word to PDF, ilovepdf.com also has an Excel to PDF that is pretty cool too. JPG to PDF as well. All tools I have used/needed at some time or another.

Link to post
9 minutes ago, alwaysaugust said:

The only other thing I used to use from there I found in another Alfred Workflow but could be useful in your workflow which is Word to PDF, ilovepdf.com also has an Excel to PDF that is pretty cool too. JPG to PDF as well. All tools I have used/needed at some time or another.

 

If you talk about Word to PDF Converter it's a workflow of mine. I have no plans to add this feature to APT.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...