xilopaint Posted July 23, 2016 Posted July 23, 2016 (edited) Alfred PDF Tools 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 apull request. Credits This workflow relies on pypdf library by Martin Thoma, docopt by Vladimir Keleshev and K2pdfopt by willus. Edited August 7, 2023 by xilopaint designjoe, AlvinFoo and 2pilvic 3
xilopaint Posted July 23, 2016 Author Posted July 23, 2016 (edited) Update (v1.1.1): Added ability to set the output filename when merging files. Edited July 27, 2016 by xilopaint
xilopaint Posted July 27, 2016 Author Posted July 27, 2016 Update (v1.1.2): Fixed a bug in Merge file action that may cause the output file is moved to trash when its name is identical to any of the input filenames.
xilopaint Posted July 30, 2016 Author Posted July 30, 2016 Update (v1.1.3): Fixed a bug that could create an empty output file when merging certain PDF files.
xilopaint Posted April 3, 2017 Author Posted April 3, 2017 (edited) Update (v2.0): This is a major update. Now Alfred PDF Tools can optimize and compress PDF files. This release also added an auto-update feature. Edited April 3, 2017 by xilopaint
xilopaint Posted April 21, 2017 Author Posted April 21, 2017 Update (v2.1): Added ability to encrypt PDF files.
2pilvic Posted April 21, 2017 Posted April 21, 2017 4 hours ago, xilopaint said: Update (v2.1): Added ability to encrypt PDF files. Could make the flow to accept multiple files? Thanks you
alwaysaugust Posted April 22, 2017 Posted April 22, 2017 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.
xilopaint Posted April 22, 2017 Author Posted April 22, 2017 (edited) 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 April 22, 2017 by xilopaint
xilopaint Posted April 22, 2017 Author Posted April 22, 2017 (edited) 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 April 27, 2017 by xilopaint
alwaysaugust Posted April 22, 2017 Posted April 22, 2017 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.
xilopaint Posted April 22, 2017 Author Posted April 22, 2017 (edited) 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 April 22, 2017 by xilopaint
xilopaint Posted April 23, 2017 Author Posted April 23, 2017 Update (v2.2): Added ability to encrypt multiple PDF files.
alwaysaugust Posted April 23, 2017 Posted April 23, 2017 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?
xilopaint Posted April 23, 2017 Author Posted April 23, 2017 (edited) 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 April 23, 2017 by xilopaint
alwaysaugust Posted April 27, 2017 Posted April 27, 2017 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.
xilopaint Posted April 27, 2017 Author Posted April 27, 2017 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.
xilopaint Posted May 1, 2017 Author Posted May 1, 2017 (edited) 5 minutes ago, alwaysaugust said: OMG! Love it!!!!!! TY so much <3 Please, note you need to use the ⌘ modifier key if you want the pages in a single slice/file. Edited May 1, 2017 by xilopaint
alwaysaugust Posted May 1, 2017 Posted May 1, 2017 Yes, I have already tested both ways before posting lol. Works perfect.
xilopaint Posted May 1, 2017 Author Posted May 1, 2017 16 minutes ago, alwaysaugust said: Yes, I have already tested both ways before posting lol. Works perfect. Is there any other feature from ilovepdf.com you would like to see in Alfred PDF Tools?
alwaysaugust Posted May 1, 2017 Posted May 1, 2017 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.
xilopaint Posted May 1, 2017 Author Posted May 1, 2017 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now