Page 1 of 1

Matching on Page Width < 300 no longer works for me

PostPosted: Sun Apr 08, 2018 6:17 am
by jbrwilkinson
I just love Hazel and have been scanning, categorising and organising all of our paperwork.

One of the rules we use a lot is to move paper Receipts into a separate folder based on method of payment, so we can check our credit card bills (you wouldn't believe the horrors we've found).

Recently, like maybe a High Sierra update ago, the match on 'Page Width < 300' has stopped working. If I edit the rule and change 300 to 30000000, it still doesn't match, so it seems like the Page Width attribute matching is poorly.

How can I diagnose further?

Re: Matching on Page Width < 300 no longer works for me

PostPosted: Sun Apr 08, 2018 11:22 am
by jbrwilkinson
Okay, this was resolved by upgrading to macOS 10.13.4

Re: Matching on Page Width < 300 no longer works for me

PostPosted: Sat Dec 30, 2023 10:43 am
by jbrwilkinson
jbrwilkinson wrote:Okay, this was resolved by upgrading to macOS 10.13.4


This has broken again, currently not working in macOS Sonoma 14.2.1.

It's not clear whether it is Hazel or the Scan to PDF software.

The Hazel rule (been working for years is):

Code: Select all
all(Kind = PDF, 'Page Width' < 300, 'Receipt' not in Name, '-' not in Name)


Below is the Command Line tool output for a typical non-matching file; the output for a matching file (previously filed correctly by Hazel) is very similar.

How can I troubleshoot further?

Code: Select all
for tool in mdls xattr 'sips -g all'; do echo $tool; $(echo $tool) iCloud/Paperless/Review/Just\ Scanned.pdf; done

mdls

kMDItemAuthors                     = (
    "ABBYY FineReader for ScanSnap"
)
kMDItemContentCreationDate         = 2023-08-13 14:50:13 +0000
kMDItemContentCreationDate_Ranking = 2023-08-13 00:00:00 +0000
kMDItemContentModificationDate     = 2023-08-13 14:50:13 +0000
kMDItemContentType                 = "com.adobe.pdf"
kMDItemContentTypeTree             = (
    "com.adobe.pdf",
    "public.data",
    "public.item",
    "public.composite-content",
    "public.content"
)
kMDItemCreator                     = "ABBYY FineReader for ScanSnap"
kMDItemDateAdded                   = 2023-12-30 14:28:33 +0000
kMDItemDisplayName                 = "Just Scanned.pdf"
kMDItemDocumentIdentifier          = 208203
kMDItemEncodingApplications        = (
    "ABBYY FineReader for ScanSnap"
)
kMDItemFSContentChangeDate         = 2023-08-13 14:50:13 +0000
kMDItemFSCreationDate              = 2023-08-13 14:50:13 +0000
kMDItemFSCreatorCode               = ""
kMDItemFSFinderFlags               = 0
kMDItemFSHasCustomIcon             = (null)
kMDItemFSInvisible                 = 0
kMDItemFSIsExtensionHidden         = 0
kMDItemFSIsStationery              = (null)
kMDItemFSLabel                     = 0
kMDItemFSName                      = "Just Scanned.pdf"
kMDItemFSNodeCount                 = (null)
kMDItemFSOwnerGroupID              = 20
kMDItemFSOwnerUserID               = 502
kMDItemFSSize                      = 62429
kMDItemFSTypeCode                  = ""
kMDItemInterestingDate_Ranking     = 2023-12-30 00:00:00 +0000
kMDItemKind                        = "PDF document"
kMDItemLastUsedDate                = 2023-12-30 14:18:27 +0000
kMDItemLastUsedDate_Ranking        = 2023-12-30 00:00:00 +0000
kMDItemLogicalSize                 = 62429
kMDItemNumberOfPages               = 1
kMDItemPhysicalSize                = 65536
kMDItemSecurityMethod              = "None"
kMDItemUseCount                    = 4
kMDItemUsedDates                   = (
    "2023-12-30 00:00:00 +0000"
)
kMDItemVersion                     = "1.5"

xattr

com.apple.lastuseddate#PS
com.apple.quarantine

sips -g all

/Users/james/Library/Mobile Documents/com~apple~CloudDocs/Paperless/Review/Just Scanned.pdf
  pixelWidth: 221.550
  pixelHeight: 377.895
  typeIdentifier: com.adobe.pdf
  format: pdf
  formatOptions: default
  dpiWidth: 72.000
  dpiHeight: 72.000
  hasAlpha: yes
  creation: 2023-08-13 14:50:13 +0000
  software: ABBYY FineReader for ScanSnap
  artist: ABBYY FineReader for ScanSnap

Re: Matching on Page Width < 300 no longer works for me

PostPosted: Tue Jan 02, 2024 10:44 am
by Mr_Noodle
If you use Hazel's preview, what does it show when you try to view the Page Width there?

Re: Matching on Page Width < 300 no longer works for me

PostPosted: Thu Jan 04, 2024 12:00 pm
by scutdog
The Page Width and Page Height has disappeared for me. I'm currently migrating from an Intel to M2 Mac, so the jumps in version numbers are weird.

I opened the Rule Status window. Then I clicked on the circle-i to see the metadata for a PDF file:

Hazel 5.3.1 on Mac OS 14.2.1 Sonoma on M2 - missing Page Width and Page Height, but has Date Last Opened

Hazel 5.1 on Mac OS 10.14.6 Mojave on Intel - has Page Width and Page Height, but missing Date Last Opened

Need more info?

Re: Matching on Page Width < 300 no longer works for me

PostPosted: Fri Jan 05, 2024 9:50 am
by Mr_Noodle
That is derived from Spotlight, not Hazel. What attributes are available is dependent on what software and Spotlight importers you have installed. You should check which software you have installed which may be responsible for that.