automation

Automating PDF Find & Replace Using All-About-PDF Command Line

Imagine you arrive at work and your manager calls you into their office and tells you that they have a special task for you. You see, the law firm you work for has just landed a new client and inherited a bunch of cases; consequently they now have over 80,000 PDF documents that need to be searched for certain words and each one needs to be replaced with random words. This is going to be an ongoing task for your role going forward. 

You are probably about to have a very bad week. Or is that months?

Unless of course you download All-About-PDF and use the new Find-Replace Command Line feature. This feature allows to create a special file that contains the entire Find-Replace definition including the find-replace pairs, the location of the PDF files etc. Once defined and saved, you can then run All-About-PDF with a special command to this file and it will process all the documents in the background while you get more important things done! 

Hey the week isn’t looking so bad after all? Let’s see how this works.

First create the special (JSON) file to hold the Find-Replace definition. Have a look at the sample below for all the fields available. This file should be saved on the same PC that All-About-PDF is installed on.

{
    "fileName":"C:\\My Documents\\Reports\\*.pdf”,
    “findReplacePairs":{"Binky":"Pacifier","Trash":"Garbage","Sidewalk":"Pavement"},
    “useRegex":true,
    “pageRange":"1-3, 5-7",
    “underline":false,
    “strikethrough":false,
    “outputFolder":"C:\\My Documents\\Reports\\Processed",
    “findReplacePairsFile":"C:\\My Documents\\Automation\\FindReplaceValues.txt",
    “showResult":false,
    “fileNameSuffix":"_processed"
}

The available fields are as follows:

You may also store your Find-Replace pairs in a separate text file by using the simple format below. This file can then be referenced in the JSON file above for the findReplacePairsFile field e.g.

Trash=>Garbage
Binky=>Pacifier
Sidewalk=>Pavement
Blinker=>Indicator

To put it all together, you can use the command below to run All-About-PDF to process your files.

%programfiles%\All-About\PDF\all-about-pdf.exe /findreplacewjsonfile {the path to the json file}

A real world usage of the above:

%programfiles%\All-About\PDF\all-about-pdf.exe /findreplacewjsonfile {C:\My Documents\Automation\findreplace.json}

As you can see, this advanced feature of All-About-PDF is a great time saver in carrying out a task that would otherwise be impossible to get done manually.

To get started with processing your PDF documents, download All-About-PDF today!

How To Create Personal Automations Using iOS 13.1

Yesterday, Apple released iOS 13.1 for iPhone and iPadOS for iPad. The feature that has me really excited in this release is Personal Automations.

In past versions of iOS, you could set up Home Automations using the Home or the Shortcuts apps so that your HomeKit enabled accessories could react to changes in conditions around the the home. For example, you could have your garage lights come on automatically at sunset or change the temperature on your thermostat whenever you leave your house.

Personal Automations take this basic concept and applies it to conditions affecting your iPhone or iPad. For example, you can now set your iPhone to being playing a specific music playlist whenever you arrive at home. Or you can automatically send an iMessage at a certain time of the day.

I travel a lot between the UK and the US so when I am away, I have a Personal Automation that sends my children a goodnight message every day at 3PM EST (8PM UK) time.

I also love to fly drones so I have another Personal Automation that turns on Do Not Disturb as soon as I open the DJI GO app. The potential of these automations are only limited by your imagination and can include features such as creating or marking up PDF documents.

So how do you create a Personal Automation in iOS 13.1?

First, find the Shortcuts app that now comes preinstalled with iOS 13 and open it. Next, at the bottom of the app, select the "Automation" tab and then hit the "+" button at the top right to begin asdding a new Automation.

Select "Personal Automation" and you will be presented with a list of trigger types to pick from. These vary from events such as time of day or alarms to phone setting changes such as when you join WiFi or you open a specific app.

Each choice of trigger will give you further options to tweak just the way you want before you are presented with a screen to add the Actions that will occur when the trigger is fired.

There are so many Actions that I couldn’t possible list all of them in this article and more are being added by third party developers all the time. You can also also chain together different actions together into complete workflows!

Once you are satisfied with your setup, hit the "Done" button to save your Personal Automation.