Jump to content

Alfred PDF Tools – Optimize, encrypt and manipulate PDF files


Recommended Posts

@vitor I contacted the maintainer of k2pdfopt and he told me how to disable the interactive mode. That was enough to, at the same time, passing the arguments to subprocess.Popen as an array and removing both the echo command and shell=True.


The only issue now is that double quotes are still an illegal character, but this is an issue with k2pdfopt that I already reported to him and he promised to look into.

Edited by xilopaint
Link to comment
  • 2 weeks later...
On 4/11/2022 at 10:25 PM, 2pilvic said:

It works great, even "optimize". Thank you very much for your wonderful workflow (iMac, M1, MacOS 12.2.1.)

 

Thank you for this wonderful workflow. In merge option for pdf, is it possible to retain bookmarks from individual files as well as add file name as root name? PDF exchange in windows has this useful option and it will be good if this can be added. Many thanks in advance

Link to comment
On 5/22/2022 at 7:58 AM, pankajsz said:

 

Thank you for this wonderful workflow. In merge option for pdf, is it possible to retain bookmarks from individual files as well as add file name as root name? PDF exchange in windows has this useful option and it will be good if this can be added. Many thanks in advance

@xilopaint request to please look into retaining existing bookmarks while merging pdf files

Link to comment
  • 3 weeks later...

As PyPDF2 development resumed after a long hiatus I decided to rewrite the workflow again using it. This represents a noticeable gain in performance, a more lightweight installation file and a more maintainable codebase as PyPDF2 is a pure Python library.

Link to comment
On 5/22/2022 at 12:58 AM, pankajsz said:

is it possible to retain bookmarks from individual files

 

It should be but I’ve been facing issues with some PDFs so I avoided to import bookmarks to the files created with the workflow. It can change in the future as I’ve opened an issue about this on PyPDF2 repo.

 

On 5/22/2022 at 12:58 AM, pankajsz said:

as well as add file name as root name

 

Sorry, I don't get you here.

Link to comment
2 hours ago, xilopaint said:

 

It should be but I’ve been facing issues with some PDFs so I avoided to import bookmarks to the files created with the workflow. It can change in the future as I’ve opened an issue about this on PyPDF2 repo.

 

 

Sorry, I don't get you here.

 

Thanks xilpaint. See if the example below makes it more clear:

 

File1.pdf with bookmarks Bkm1, Bkm2 etc

File2.pdf with bookmarks BkmA, BkmB etc

 

Newfie.pdf with bookmarks as below:

 

File1.pdf (level 1 using filename) -- sublevel Bkm1, Bkm2

File2.pdf  (level1 using filename) -- sub level BkmA, BkmB

 

 

Edited by pankajsz
Link to comment
On 6/9/2022 at 2:41 AM, pankajsz said:

 

Thanks xilpaint. See if the example below makes it more clear:

 

File1.pdf with bookmarks Bkm1, Bkm2 etc

File2.pdf with bookmarks BkmA, BkmB etc

 

Newfie.pdf with bookmarks as below:

 

File1.pdf (level 1 using filename) -- sublevel Bkm1, Bkm2

File2.pdf  (level1 using filename) -- sub level BkmA, BkmB

 

 

Sorry, but I can't change the outline structure for a whole user base just to suit one person's way of organizing their own PDF files.

Edited by xilopaint
Link to comment
2 hours ago, Rad said:

Hi @xilopaint and thank you for your amazing work. This might be a silly question but once I've used the Optimize function and enter entered a resolution, I don't see a new file created / the original file changed. What should I see?

 

Thanks!

You should see a new enhanced file with the same name of the original one with an [optimized] tag appended. If the file is big the optimization can take some time to finish. You can track the progress using the progress keyword. If the file is not being created I need the output of the Alfred Debugger and, if possible, the original PDF file to investigate the reason. You can send me the file by PM.

Link to comment
On 6/9/2022 at 11:35 AM, xilopaint said:

Sorry, but I can't change the outline structure for a whole user base just to match one person's way of organizing their own PDF files.

Thanks. It is fine. It will be great if you can suggest how this can be done. I can create variant of standard workflow for my use case.

Link to comment

Hey guys, @vitor gave me a good hand but he's currently busy with Alfred 5 development and I still need someone with a M1 Mac for a few minutes. Anyone willing to help me testing a build on Telegram? You don't need to be a coder or having any especial knowledge, just an Alfred user.

Link to comment
  • 1 month later...

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