I have written a small plugin for my own use to convert the Irish Registrations and Census documents which come down as PDFs and add them as sources to a project in Family Historian.
It requires a 3rd party utility called pdftocairo.exe to be installed in a folder called c:\utils\pdftocairo it's part of the poppler suite
The pdftocairo can be downloaded from
http://www.fhug.org.uk/programs/pdftocairo.zip
* Convert PDF to Jpgs and add each page as media and add as a source
- Jane
- Site Admin
- Posts: 8507
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Convert PDF to Jpgs and add each page as media and add as a source
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 28333
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Convert PDF to Jpgs and add each page as media and add as a source
Jane, I've had a quick look at the script and have a few comments.
Your description of what the Plugin does appears to be incomplete.
Whatever file is chosen it is added as Media to a Source unconditionally, unless it happens to be PDF.
Then the user has the choice of keeping it as PDF or converting to JPEG image file(s), which are similarly added.
I find it little disconcerting when a Plugin Filename and its Title are different.
In the convertPDF(...) function there is a local pWorkdir variable that is not used.
Confusingly there is a pWorkDir variable that is used a lot and confused me for a moment.
Your description of what the Plugin does appears to be incomplete.
Whatever file is chosen it is added as Media to a Source unconditionally, unless it happens to be PDF.
Then the user has the choice of keeping it as PDF or converting to JPEG image file(s), which are similarly added.
I find it little disconcerting when a Plugin Filename and its Title are different.
In the convertPDF(...) function there is a local pWorkdir variable that is not used.
Confusingly there is a pWorkDir variable that is used a lot and confused me for a moment.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
- Jane
- Site Admin
- Posts: 8507
- Joined: 01 Nov 2002 15:00
- Family Historian: V7
- Location: Somerset, England
- Contact:
Re: Convert PDF to Jpgs and add each page as media and add as a source
As I said this is one I wrote for my own use. I posted here to see if there was any interest in it, as it works for me, but could never go in the Plugin store as it needs additional software to do anything useful with the PDFs
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
- tatewise
- Megastar
- Posts: 28333
- Joined: 25 May 2010 11:00
- Family Historian: V7
- Location: Torbay, Devon, UK
- Contact:
Re: Convert PDF to Jpgs and add each page as media and add as a source
I imagine the Plugin Store description, and a Plugin message box if it detects the pdftocairo app is missing, could advise the user how to install pdftocairo.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry