Jump to content

Alfred PDF Tools – Optimize, encrypt and manipulate PDF files


Recommended Posts

Alfred PDF Tools

alfred-pdf-tools total code%20style-black-000000 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c696e74696e672d70796c696e742d79656c6c6f77677265656e security-bandit-yellow 3b9d7ae47ec34509a2ba833b0e0d5cc068747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f436f7665726167652f3362396437616534376563333435303961326261383333623065306435636330

 

icon.png?raw=true


Description


Optimize, encrypt and manipulate PDF files using Alfred.


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 used if no value is input) and the
    document will be improved with increased contrast and straightened text;
  • Deskew: Straighten the selected PDF files with no further appearance changes;

 

Quote

Tip: Invoke Alfred and type the progress keyword to track the enhancement
process from either of the first two mentioned file actions.

 

  • 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, 20-);
  • 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, 20-);
  • 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.


Credits


This workflow relies on pypdf library by Martin Thoma, docopt by Vladimir Keleshev and K2pdfopt by willus.

 

Edited by xilopaint
Link to comment
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 comment
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 comment
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 comment
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 comment

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 comment
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 comment

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 comment
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 comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...