* PDF and Images for Medium to Large Diagrams

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile
Post Reply
User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 18 Nov 2019 16:48

I am new to Family Historian. The most trouble I had in getting up to speed is printing or creating images of diagrams, even medium-sized ones. I think I have a solution for making high-resolution PDF's and images that is not too much harder than using the menu items in FH and that works for large images, at least as large as my All Relatives diagram, which according to Diagram Statistics is about 16' by 3'.

There are two ways to create a PDF for a diagram.
  • Diagram | Save Diagram As | PDF, PNG, etc.
  • File | Print
Using the first for a diagram you can save it as a one page PDF. This uses Family Historian PDF, which is a third-party application. For me this application hangs on even medium-sized diagrams and, at best, is limited to 128" in either direction. I haven't checked to determine what resolution the image in the PDF ends up being. It is not under your control, as far as I know.

Using the second you usually have to select a standard page size, non of which may be large enough to hold your diagram on a single page. These cause FH to page the diagram, so the output contains more than one page. In particular Microsoft Print to PDF, which comes with Windows, only has relatively small paper sizes available.

For saving images you have the first choice, using, say PNG. There are two problems here. It uses the screen resolution unless you do something (see below). This is typically 96 dpi, whereas conventional wisdom for printing is to use 300 dpi. More importantly, it will not do large images, giving you a dialog that says "Unable to save diagram in this file format. The image may be too large..." and goes on to give advice on how to deal with this, including using EMF.

For large diagrams, at least, none of these suggestions gives what I want, the full diagram at 300 dpi. For the EMF option, I had a hard time finding an application that would view it, and the three I found (InfranView, Paintshop Pro, and Inkscape) all did it poorly. I found no way to create a usable PNG from the EMF. There may be a problem with how FH writes EMF, but I don't know that.

Before getting to my solution, note the following:

You can save your diagram in any resolution by setting the Zoom level accordingly. To get 300 dpi on a 96 dpi screen, use 313% =100*300/96. This works as long as FH will allow you to use it.

Use File | Print Setup to set the printer you want to use. This will cause FH to reset the page boundaries, so you can see what will happen. This was not immediately obvious to me but has been very useful.

My solution involves using PDF Creator, which is free. I have used it for years and been happy with it. What works with PDF Creator is to choose Postscript Custom Page Size as the paper size. This lets you choose the output size. I needed to get the size from Diagram Statistics and use the height in the width box and width in the height box. The default resolution says 600 dpi. I didn't change that. The PDF's created are sharp when I zoom in.

To get an image I used GhostScript with the PDF file. The command line for me is:

C:\Program Files\gs\gs9.20\bin\gswin64c -dNOPAUSE -dBATCH -r<resolution> -sDEVICE=png16m -sOutputFile="<your-output-file-name> <your-pdf-file-name>"

I use 300 for the resolution. This is a version of GhostScript I installed a long time ago, and I do not remember the details, so I won't give them here. Specifying a higher resolution than is in the PDF will not be useful, but the default 600 dpi seems to be ok. I get a usable PNG of my 16' All Relatives diagram, with not too much work (after it is set up, of course 8-) ).

In my case I wrapped the GhostScript command in a C# console app. The reason is that you can use the Open With menu in File Explorer on a PDF and it will then appear in the Open With menu next time, making it easy to use. I use C# as it makes a .exe and appears more attractive in the Open With menu. You could just as well use a BAT file, PowerShell script, or Java JAR. My C# application can be found at https://github.com/KennethEvans/VS-ConvertPdfToImage. The GhostScript location and output directory is hard-coded and would need to be changed.

I have used this program for many years for other uses and it seems to work. The heavy lifting is done by GhostScript, of course, not my application, which is very simple.

There are likely other ways to get an image from a PDF. There seem to be a number of online converters, but they seem to come marked as an ad. Since I already have a solution, I didn't look very hard. You may want to if you don't want to use GhostScript.

Finally I will note that as far as I know, neither PDF nor any of the image formats is limited in image size. These are limitations in the implementation in FH or Family History PDF.

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 18 Nov 2019 19:46

Welcome to the FHUG Kenneth.

Some of the techniques you mention, and maybe some you don't, are covered in these articles:
Knowledge Base > Single Page PDF of a Diagram
Knowledge Base > Enhanced/Placeable Metafile

It may be worth expanding them to include your techniques if your experiences prove those articles are insufficient.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 19 Nov 2019 01:46

Hi Mike,

I had seen those articles before posting. There is definitely information in this post that is not in them, quite a bit. The one on Single Page PDF of a Diagram is much more polished and has information not in this post. Adding to that one might be appropriate. However, this topic is about both single-page PDF's and images.

That article has no mention of PDF Creator, which, with its ability to specify a page size, is a key element. Nor does it mention a way to get large images from the PDF when you can't from FH. The way I describe gets around the limitations of Family Historian PDF, as well.

The other article does not mention much on what to do with EMF's, what I found to be a problem. InfranView, in particular, did not open my file correctly. Having found better ways, I am not especially interested in EMF's except to avoid them. Most applications support inserting images, which I can now generate without resorting to EMF's.

For curiosity, I did just now try LibreOffice, and it opened my EMF image. It will not let me zoom in enough to see if it handled it right, though. It isn't the proper place to use such a large image, anyway. On the other hand, the 16' x 3' image could be plotted on a flat-bed printer, something I have done with such charts before. For that you want an image.

In general, I can see no reason for using EMF's instead of images and lots of reasons not to. Perhaps there is something I missed.

User avatar
ColeValleyGirl
Megastar
Posts: 1652
Joined: 28 Dec 2005 22:02
Family Historian: V6.2
Location: Cirencester, Gloucestershire
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by ColeValleyGirl » 19 Nov 2019 07:19

Kenneth, please go ahead and edit the Knowledgebase to include your extra info.

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 19 Nov 2019 10:31

I think the Knowledge Base > Single Page PDF of a Diagram does cover some of the points you mention.

In many places it refers to PDF Creators that links to Knowledge Base > Downloads and Links ~ PDF Utilities and lists Knowledge Base > Utility ~ PDF Creator that you like.

Under Knowledge Base > Set Print Properties it explains how to set Page size and Resolution for Family Historian PDF and other PDF Creator utilities that support up to 200" and accommodate your 16' x 3' diagram.
Those Properties are also available after the Adjust PDF File Page Size so that Diagram fits into One Page option.

The Knowledge Base > Downloads and Links ~ PDF Utilities mentioned above offers tools for converting PDF to image files, and there are plenty of others as mentioned under Knowledge Base > Adding Other Media and listed in Knowledge Base > Downloads and Links ~ Graphics Packages.

It should be quite easy to adapt the current Knowledge Base > Single Page PDF of a Diagram to cover the extra tips.

I agree that EMF are best avoided, and suspect their behaviour depends on what features are included in the Diagram.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 19 Nov 2019 16:49

Mike,

Yes, the other article does cover some of the points I mentioned, and in addition some are in the User Guide. I included them for continuity.

The other article did mention some other PDF printers, but not PDF Creator explicitly. It uses the term PDF Creators generically. I did not follow the link to the resources. It does not mention in detail how to use PDF Creator to get a single page, as I did. In fact, I had read this article before trying to deal with the issues I found. It did not solve my problem, in short that Family Historian PDF was hanging on even moderate-size plots at 300 dpi, and the ways to save an image for a large diagram or a moderate-size diagram at 300 dpi are definitely limited.

By the way, 16' is larger than 200". I would like to state, for the record, that I have no plans to print a 16' diagram. I only did that to test if my solution works for very large diagrams. It seems to.

I agree it would be better to have all the information in one place. You are more comfortable than I with my being the person to do it. If I do that I would like, at least, for it to be reviewed. I am new to FH, and while I feel I have it in hand enough to meet my needs, I am certainly not an expert.

And there is the fact that it also deals with images in addition to single-page PDF's.
Last edited by KennethEvans on 19 Nov 2019 17:15, edited 1 time in total.

User avatar
ColeValleyGirl
Megastar
Posts: 1652
Joined: 28 Dec 2005 22:02
Family Historian: V6.2
Location: Cirencester, Gloucestershire
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by ColeValleyGirl » 19 Nov 2019 16:59

Hi, Kenneth -- do the edits and ask for review here? Those of us a bit more used to the Knowledgebase can always roll back if necessary (or more likely just tweak what you have done and check with you that we haven't destroyed your meaning).

There's a guide to editing the Knowledgebase here -- Knowledge Base > Contribute Your Knowledge ~ Alternative Approach -- Mike Tate and I are still working on it but it should be enough to get you started.

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 19 Nov 2019 17:17

Another issue: My article deals with images in addition to single-page PDF's. Thus, it doesn't really fit in the other topic.

Added later: I looked at the link to the Knowledge Base. I wasn't aware what is was before. I think I can do that. It works for me if you if you look it over and check with me.

My suggestion would be to make a new topic on Saving Images. Using hyperlinks should tie it all together.

It would also be good to get the the discussion about the Knowledge Base out of this topic as it isn't really about the topic itself. Is there a way to do that and also to keep any future knowledge-base discussions separate.

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 19 Nov 2019 19:49

Kenneth, I am confused by your comment that 16' is larger than 200".
16 feet x 12 inches = 192 inches which is less than 200 inches ~ QED.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 19 Nov 2019 21:30

Mike,

Sorry, I was wrong. I was confusing it with the 128" limit in Family Historian PDF.

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 20 Nov 2019 11:38

As a matter of interest, what advantage do you gain by producing a large image file of a Diagram instead of just working with the PDF file of the Diagram?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 20 Nov 2019 14:59

Actually, I haven't made much use of either yet. I have sent both to other people. I haven't got any feedback on which they prefer. It's easier to use images in other applications, I think.

If you want to print, you can use one-page PDF's and use a PDF viewer to do any paging. It's probably therefore easier to print a PDF. For the ones I've done, the PDF's have smaller file sizes. Perhaps they are stored as vectors.

I am a digital artist and work with images a lot, so it's a natural for me to do images (and get the DPI right). The commercial printers I use want images, not PDF's.

In real life I am a scientist and just interested in how things work. FH does provide both options. It's just that doing medium and large diagrams doesn't work well. It was a challenge and may be useful to someone. It's always nice to have options. Different people do things differently.

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 21 Nov 2019 22:20

I have written this up in the Knowledgebase as requested. it probably should be proofed.

Knowledge Base > Single Page PDF of a Diagram
Knowledge Base > Diagram Tips and Tricks

In the process I discovered you can also use PDFCreator to just save a PNG or other image format. This is described in Knowledge Base > Saving Medium or Large Diagrams

It turns out the PDFCreator I describe is different from the one already in the Knowledgebase. I have added it as PDFCreator (pdfforge).
Knowledge Base > Utility ~ PDFCreator (pdfforge)

The short answer in regard to Mike's question about the actual need for very large PDF's is "probably not". I once made a very long all-ancestor chart on a flat-bed printer, though. It has been sitting, rolled up in my closet for over a decade now.

However, the problems I ran into happened for much smaller diagrams. In any event, these methods work for all sizes, possibly limited by 200".

-----------------------------------------
I found this on the web:

In PDF versions earlier than PDF 1.6, the size of the default user space unit is fixed at 172 inch. In Acrobat viewers earlier than version 4.0, the minimum allowed page size is 72 by 72 units in default user space (1 by 1 inch); the maximum is 3240 by 3240 units (45 by 45 inches). In Acrobat versions 5.0 and later, the minimum allowed page size is 3 by 3 units (approximately 0.04 by 0.04 inch); the maximum is 14,400 by 14,400 units (200 by 200 inches).

Beginning with PDF 1.6, the size of the default user space unit may be set with the UserUnit entry of the page dictionary. Acrobat 7.0 supports a maximum UserUnit value of 75,000, which gives a maximum page dimension of 15,000,000 inches (14,400 * 75,000 * 172). The minimum UserUnit value is 1.0 (the default)."

https://community.adobe.com/t5/acrobat/ ... -p/3811127

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 21 Nov 2019 22:45

Will review changes when I get a spare moment.
However, I disagree that those two PDF Creators are different.
The KB existing SourceForge entry links to https://sourceforge.net/projects/pdfcreator/support that refers to the http://forums.pdfforge.org/ site of your new entry, so they must be the same product.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
KennethEvans
Diamond
Posts: 52
Joined: 18 Nov 2019 15:17
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by KennethEvans » 21 Nov 2019 23:56

Hi Mike,

I saw that it was Sourceforge, as opposed to a very polished commercial site. I didn't follow the link and look at the page, and just assumed they were different. It isn't unusual to have both, though.

On looking more closely, the logos are the same, but the download links are different on each site.

https://sourceforge.net/projects/pdfcre ... t/download
Seems to be 1.7.2.

http://download.pdfforge.org/download/p ... tor-stable
This is 3.5.2.

Sourceforge is losing ground now that there is Github. And they probably have outgrown it. It seems to have a really old version.

I think my new page is clearly the better place for a FH user to use. It would be better if you fixed that up. I can fix any text that has "(pdfforge)" in what I did today, if you like.

Sorry. But I wasn't that far wrong. 8-)

avatar
TMG_refugee
Gold
Posts: 20
Joined: 14 Nov 2015 15:44
Family Historian: V6.2

Re: PDF and Images for Medium to Large Diagrams

Post by TMG_refugee » 21 Feb 2020 20:26

This post is somewhat old but I was wondering if FH has tried to write to the Adobe PSB format which will handle images of 300K pixels by 300K pixels which would create an image at 300 dpi of 1000 inches by 1000 inches. Certainly large enough for anything I have.

All my PDF saves have resulted in 4 or more pages in the PDF even if I select to try one page if possible.

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 21 Feb 2020 21:37

See Knowledge Base > Single Page PDF of a Diagram that explains techniques for reducing the number of pages so the Diagram fits on one PDF page.

FH itself does NOT ever produce PDF at all. It entirely relies upon PDF creator printer drivers.
The Family Historian PDF is actually the NovaPDF printer driver, but you can install whatever you wish as explained in the above KB article.
So if you can find a PDF printer driver that creates Adobe PSB format you should be able to use it.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
trevorrix
Famous
Posts: 152
Joined: 17 Nov 2002 20:27
Family Historian: V6.2
Location: Suffolk, England

Re: PDF and Images for Medium to Large Diagrams

Post by trevorrix » 26 Feb 2020 09:31

If anyone ever has the need there is a Free Online PDF Pages Merger that works.

http://www.pdfdu.com/pdf-pages-merge.aspx
Trevor Rix

User avatar
tatewise
Megastar
Posts: 18165
Joined: 25 May 2010 11:00
Family Historian: V6.2
Location: Torbay, Devon, UK
Contact:

Re: PDF and Images for Medium to Large Diagrams

Post by tatewise » 26 Feb 2020 10:21

Trevor, on that utility home page under Online splicing PDF Page it says:
If you choose to merge all pages to one page, and the page size when combined exceeds 500cm when merged, the document may not be displayed correctly, use "PDF page zoom" tool to reduce the paper size.
500cm is much the same as the 5080mm limit mentioned in Knowledge Base > Single Page PDF of a Diagram so may not be a satisfactory solution for such large Diagrams.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply