Jump to content

Alfred PDF Tools – Optimize, encrypt and manipulate PDF files


Recommended Posts

For some reason, I am unable to merge pdf documents although Alfred's debugger does not indicate any problem. Below is the output. Would you be able to help? Many thanks in advance.

 

[9:49:31.225 PM] Logging Started...
[9:49:33.863 PM] Alfred PDF Tools[File Action] Processing complete
[9:49:33.870 PM] Alfred PDF Tools[File Action] Passing output '(
    "/Users/victorkreitmann/Downloads/23.pdf",
    "/Users/victorkreitmann/Downloads/22.pdf"
)' to Arg and Vars
[9:49:33.873 PM] Alfred PDF Tools[Arg and Vars] Processing complete
[9:49:33.874 PM] Alfred PDF Tools[Arg and Vars] Passing output '' to Keyword

 

Edited by itsmevictor
Link to comment
2 hours ago, itsmevictor said:

For some reason, I am unable to merge pdf documents although Alfred's debugger does not indicate any problem. Below is the output. Would you be able to help? Many thanks in advance.

 

[9:49:31.225 PM] Logging Started...
[9:49:33.863 PM] Alfred PDF Tools[File Action] Processing complete
[9:49:33.870 PM] Alfred PDF Tools[File Action] Passing output '(
    "/Users/victorkreitmann/Downloads/23.pdf",
    "/Users/victorkreitmann/Downloads/22.pdf"
)' to Arg and Vars
[9:49:33.873 PM] Alfred PDF Tools[Arg and Vars] Processing complete
[9:49:33.874 PM] Alfred PDF Tools[Arg and Vars] Passing output '' to Keyword

 

 

It seems you are not entering the filename for the output PDF file.

Link to comment

@xilopaintIndeed, you're right, I posted the wrong error message. The problem remains however. Sorry!

 

[7:23:37.516 AM] Logging Started...
[7:23:40.517 AM] Alfred PDF Tools[File Action] Processing complete
[7:23:40.525 AM] Alfred PDF Tools[File Action] Passing output '(
    "/Users/victorkreitmann/Downloads/6.pdf",
    "/Users/victorkreitmann/Downloads/1.pdf",
    "/Users/victorkreitmann/Downloads/2.pdf",
    "/Users/victorkreitmann/Downloads/3.pdf",
    "/Users/victorkreitmann/Downloads/4.pdf",
    "/Users/victorkreitmann/Downloads/5.pdf"
)' to Arg and Vars
[7:23:40.527 AM] Alfred PDF Tools[Arg and Vars] Processing complete
[7:23:40.528 AM] Alfred PDF Tools[Arg and Vars] Passing output '' to Keyword
[7:23:42.126 AM] Alfred PDF Tools[Keyword] Processing complete
[7:23:42.134 AM] Alfred PDF Tools[Keyword] Passing output 'test' to Run Script
[7:23:42.346 AM] ERROR: Alfred PDF Tools[Run Script] .
07:23:42 workflow.py:2278 DEBUG    ---------- Alfred PDF Tools (4.2.0) ----------
07:23:42 workflow.py:1681 DEBUG    reading settings from /Users/victorkreitmann/Library/Application Support/Alfred/Workflow Data/com.xilopaint.alfredapp.pdftools/settings.json
07:23:42 workflow.py:1681 DEBUG    reading settings from /Users/victorkreitmann/Library/Application Support/Alfred/Workflow Data/com.xilopaint.alfredapp.pdftools/settings.json
07:23:42 workflow.py:2679 INFO     checking for update ...
07:23:42 background.py:214 DEBUG    [__workflow_update_check] command cached: /Users/victorkreitmann/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/com.xilopaint.alfredapp.pdftools/__workflow_update_check.argcache
07:23:42 background.py:218 DEBUG    [__workflow_update_check] passing job to background runner: ['/usr/bin/python3', '-m', 'workflow.background', '__workflow_update_check']
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
07:23:42 workflow.py:2298 ERROR    Command '['/usr/bin/python3', '-m', 'workflow.background', '__workflow_update_check']' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/Users/victorkreitmann/Desktop/synced/life/synced preferences/alfred preferences/Alfred.alfredpreferences/workflows/user.workflow.567A3465-F532-4A1E-AC22-43BA6A656C6C/workflow/workflow.py", line 2289, in run
    self.check_update()
  File "/Users/victorkreitmann/Desktop/synced/life/synced preferences/alfred preferences/Alfred.alfredpreferences/workflows/user.workflow.567A3465-F532-4A1E-AC22-43BA6A656C6C/workflow/workflow.py", line 2681, in check_update
    run_in_background("__workflow_update_check", cmd)
  File "/Users/victorkreitmann/Desktop/synced/life/synced preferences/alfred preferences/Alfred.alfredpreferences/workflows/user.workflow.567A3465-F532-4A1E-AC22-43BA6A656C6C/workflow/background.py", line 219, in run_in_background
    retcode = subprocess.run(cmd, check=True).returncode
  File "/opt/homebrew/Cellar/python@3.10/3.10.6_2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'workflow.background', '__workflow_update_check']' returned non-zero exit status 1.
07:23:42 workflow.py:2301 INFO     for assistance, see: https://github.com/xilopaint/alfred-pdf-tools
07:23:42 workflow.py:2322 DEBUG    ---------- finished in 0.021s ----------

 

Link to comment

Some more Apple weirdness, no doubt. I was getting the same, even after trashing, rebuilding, and signing the Notificatior app. What solved it was to go into System Settings → Notifications, then right-click → Reset Notifications… After that, every Notificator worked as usual.

Link to comment
28 minutes ago, vitor said:

Some more Apple weirdness, no doubt. I was getting the same, even after trashing, rebuilding, and signing the Notificatior app. What solved it was to go into System Settings → Notifications, then right-click → Reset Notifications… After that, every Notificator worked as usual.

 

It worked, thanks!

 

Maybe you can help me with another issue. I don't see the option to share an iCloud file by a link anymore.

Link to comment
17 hours ago, xilopaint said:

I don't see the option to share an iCloud file by a link anymore.

 

Hadn’t noticed that one, but it’s the same for me. I don’t know of a fix, but do have a workaround. There is a Shortcut action which allows copying the URL from an iCloud file. You can pass it a path from Alfred with a Universal Action, I’ve done it before.

Link to comment

Hi!
Don't scold me strictly, I'm new to working with Alfred.
Added WorkFlows, installed all the necessary libraries, but WorkFlow does not work.
Perform File Actions are not added.
OS X 13.0 Ventura
If additional information is needed, I will write.
Maybe I'm doing something wrong. The other workflows that I added are working fine.

Link to comment

I understand, but nothing happens when the debugger is turned on.

When you enter the !progress commands, the following is displayed.

Снимок экрана 2022-11-03 в 10.32.20.png

 

When entering other commands, for example Merge, nothing happens. There is no information in the debugger.

 

Снимок экрана 2022-11-03 в 10.39.00.png

 

I can't even start the process

Edited by DimonK27
Link to comment
2 hours ago, DimonK27 said:

I understand, but nothing happens when the debugger is turned on.

When you enter the !progress commands, the following is displayed.

Снимок экрана 2022-11-03 в 10.32.20.png

 

When entering other commands, for example Merge, nothing happens. There is no information in the debugger.

 

Снимок экрана 2022-11-03 в 10.39.00.png

 

I can't even start the process

 

This is how you perform keywords, not file actions.

Link to comment
  • 3 weeks later...

For some reason, I am unable to optimize pdf documents although Alfred's debugger does not indicate any problem. Below is the output. Would you be able to help? Many thanks in advance.

 

[08:27:55.823] Alfred PDF Tools[File Action] Passing output '/Users/sabryeldeeb/Downloads/MBL Abha SEVEN/DESIGN REPORT/6ABHA09-ABHA-FC-DAE-GE-DEC-00001-B-ABHA IFC REPORT copy.pdf' to Arg and Vars
[08:27:55.825] Alfred PDF Tools[Arg and Vars] Processing complete
[08:27:55.826] Alfred PDF Tools[Arg and Vars] Passing output '' to Keyword
[08:27:59.478] Alfred PDF Tools[Keyword] Processing complete
[08:27:59.484] Alfred PDF Tools[Keyword] Passing output '100' to Replace
[08:27:59.486] Alfred PDF Tools[Replace] Processing complete
[08:27:59.487] Alfred PDF Tools[Replace] Passing output '100' to Run Script

Link to comment
  • 3 weeks later...
On 12/1/2022 at 3:37 AM, Sabry said:

For some reason, I am unable to optimize pdf documents although Alfred's debugger does not indicate any problem. Below is the output. Would you be able to help? Many thanks in advance.

 

[08:27:55.823] Alfred PDF Tools[File Action] Passing output '/Users/sabryeldeeb/Downloads/MBL Abha SEVEN/DESIGN REPORT/6ABHA09-ABHA-FC-DAE-GE-DEC-00001-B-ABHA IFC REPORT copy.pdf' to Arg and Vars
[08:27:55.825] Alfred PDF Tools[Arg and Vars] Processing complete
[08:27:55.826] Alfred PDF Tools[Arg and Vars] Passing output '' to Keyword
[08:27:59.478] Alfred PDF Tools[Keyword] Processing complete
[08:27:59.484] Alfred PDF Tools[Keyword] Passing output '100' to Replace
[08:27:59.486] Alfred PDF Tools[Replace] Processing complete
[08:27:59.487] Alfred PDF Tools[Replace] Passing output '100' to Run Script

 

Sorry for the late response. Could you share the PDF file via PM? I don't have any issues with Optimize file action.

Link to comment
  • 3 weeks later...

@xilopaint Two questions on Alfred's PDF workflow:

 

1. Can 'Optimize' option lead to pdf files with size bigger than original? I have used default resolution (i.e no input which leads to a file size bigger than the original). I will test it more if this is not accepted behaviour.

2. Is it possible to add 'extract bookmarks' from the selected pdf file into text file? Request you to consider this feature. Are there other workflows that can address this? 

 

 

Link to comment
On 1/2/2023 at 8:32 AM, TomBenz said:

@xilopaint Two questions on Alfred's PDF workflow:

 

1. Can 'Optimize' option lead to pdf files with size bigger than original? I have used default resolution (i.e no input which leads to a file size bigger than the original). I will test it more if this is not accepted behaviour.

 

 

 

It’s possible. The Optimize file action is intended to improve the appearance of low quality PDF files that are made from images (e.g. scanned documents). But I would say if the input PDF file has a higher resolution in comparison to the selected resolution it’s more likely that the output PDF will have a smaller size.

 

On 1/2/2023 at 8:32 AM, TomBenz said:

2. Is it possible to add 'extract bookmarks' from the selected pdf file into text file? Request you to consider this feature. Are there other workflows that can address this? 

 

Could you explain further how the feature would work and why you need it? Would the text file be a simple .txt file?

Edited by xilopaint
Link to comment

The flow stopped working for me and I don't know what could have happened. I reinstalled macOs and it hasn't worked since. The mistake is:

 

ERROR: Alfred PDF Tools[Run Script] xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

 

The /Library/Developer/CommandLineTools/usr/ folder only contains the “share” and “lib” folders

I'd appreciate your help

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