xilopaint Posted May 13, 2022 Author Share Posted May 13, 2022 (edited) @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 May 13, 2022 by xilopaint vitor 1 Link to comment
TomBenz Posted May 22, 2022 Share Posted May 22, 2022 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
TomBenz Posted May 24, 2022 Share Posted May 24, 2022 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
xilopaint Posted June 9, 2022 Author Share Posted June 9, 2022 Update (v4.0) • pikepdf replaced with PyPDF2. Link to comment
xilopaint Posted June 9, 2022 Author Share Posted June 9, 2022 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
xilopaint Posted June 9, 2022 Author Share Posted June 9, 2022 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
TomBenz Posted June 9, 2022 Share Posted June 9, 2022 (edited) 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 June 9, 2022 by pankajsz Link to comment
xilopaint Posted June 9, 2022 Author Share Posted June 9, 2022 (edited) 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 June 14, 2022 by xilopaint Link to comment
Rad Posted June 9, 2022 Share Posted June 9, 2022 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! Link to comment
xilopaint Posted June 9, 2022 Author Share Posted June 9, 2022 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. Rad 1 Link to comment
TomBenz Posted June 10, 2022 Share Posted June 10, 2022 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
xilopaint Posted June 10, 2022 Author Share Posted June 10, 2022 (edited) 50 minutes ago, pankajsz said: 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. Never tried to do this, but there are some methods like PdfMerger.add_bookmark and PdfWriter.add_bookmark that might be helpful. Edited June 10, 2022 by xilopaint Link to comment
xilopaint Posted June 18, 2022 Author Share Posted June 18, 2022 Update (v4.0.1) • Added cleanup procedure for when the Optimize file action fails. • Fixed notification with error message not being fired by the Optimize file action. Link to comment
xilopaint Posted June 19, 2022 Author Share Posted June 19, 2022 Update (v4.0.2) • Fixed Crop file action. Link to comment
xilopaint Posted June 19, 2022 Author Share Posted June 19, 2022 I need a volunteer for a quick test in a build. Anyone willing? maybe @katie? Link to comment
xilopaint Posted June 20, 2022 Author Share Posted June 20, 2022 @vitor could you test the bundle for me? I just want to know if you get the macOS warning prompting the user to allow some unsigned binaries. Link to comment
vitor Posted June 20, 2022 Share Posted June 20, 2022 I don’t use the Workflow. I can do a quick test but I need you to be specific about what to run. Link to comment
xilopaint Posted June 20, 2022 Author Share Posted June 20, 2022 2 hours ago, vitor said: I don’t use the Workflow. I can do a quick test but I need you to be specific about what to run. I just sent you a PM. Thanks! Link to comment
xilopaint Posted June 21, 2022 Author Share Posted June 21, 2022 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
xilopaint Posted June 21, 2022 Author Share Posted June 21, 2022 Hey @giovanni, could you help me here? Link to comment
giovanni Posted June 21, 2022 Share Posted June 21, 2022 sure, but I don't use the workflow or telegram and my M1 is still on big sur. Link to comment
xilopaint Posted June 21, 2022 Author Share Posted June 21, 2022 Just now, giovanni said: sure, but I don't use the workflow or telegram and my M1 is still on big sur. No need Telegram for you. I just use it to make communication easier for non-coders. Big Sur is not a problem as well. I'm sending you a PM. Link to comment
mrflyertalk Posted July 31, 2022 Share Posted July 31, 2022 merge isn't appearing as an option for me. i'm brand new to alfred and this is the first custom workflow i've installed. i tried following the file actions list and i have two files selected to merge... Link to comment
xilopaint Posted July 31, 2022 Author Share Posted July 31, 2022 @mrflyertalk what version of the workflow are you running? Link to comment
xilopaint Posted July 31, 2022 Author Share Posted July 31, 2022 On 5/22/2022 at 12:58 AM, pankajsz said: is it possible to retain bookmarks from individual files This has been implemented in the latest version of the workflow. Link to comment
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