Page 1 of 1

[SOLVED] How do I get a whole line in a PDF?

PostPosted: Sat Jul 23, 2022 11:21 am
by IvanPsy
Greetings,
how do I get a whole line from a PDF? (it's the invoice of the AppStore, when you buy an App).
I want to get the name of the App.

As shown in the screenshot, the row above the name of the App changes, it's the number of the invoice, but it's always a string of 12 digits, so it's not a problem.

Then there is the name of the App, the text I want to grab, and it's a whole line.
Below there is the name of the developer, that I don't need, but changes for each invoice, so I'm not able to set a specified string of text.

If I set the rule as showed in the other screenshot, then Hazel takes only the first word of the line (here is "News") and misses all the other words of the line (here is "Explorer").

How do get the text of the whole line and tell Hazel to stop at the end of the line?

I attach the URL of the screenshots because I still don't understand how to upload images here.

Thank you!

https://imgur.com/a/amooYRU
Image

https://imgur.com/a/SwGA9so
Image

Re: How do I get a whole line in a PDF?

PostPosted: Mon Jul 25, 2022 9:41 am
by Mr_Noodle
What is the pattern for "name_app"?

Re: How do I get a whole line in a PDF?

PostPosted: Mon Jul 25, 2022 10:00 am
by IvanPsy
Mr_Noodle wrote:What is the pattern for "name_app"?


If you mean the pattern in the If rules, you can have a look at this link:
https://imgur.com/a/SwGA9so

In the Edit Attributes of the name_app I've set up "ab12%?" because...I was confuse on what to choose...

Re: How do I get a whole line in a PDF?

PostPosted: Tue Jul 26, 2022 9:52 am
by Mr_Noodle
That will only grab all the text up to the first space. Use "anything" if you want to grab the whole line.

Re: How do I get a whole line in a PDF?

PostPosted: Tue Jul 26, 2022 10:33 am
by IvanPsy
Mr_Noodle wrote:That will only grab all the text up to the first space. Use "anything" if you want to grab the whole line.


It works.
I've learned something new.
Thank you very much!