{"id":11177,"date":"2020-08-18T08:07:42","date_gmt":"2020-08-18T08:07:42","guid":{"rendered":"https:\/\/fhug.org.uk\/kb\/?post_type=kb_article&#038;p=11177"},"modified":"2024-02-22T16:12:15","modified_gmt":"2024-02-22T16:12:15","slug":"saving-medium-or-large-diagrams","status":"publish","type":"kb_article","link":"https:\/\/www.fhug.org.uk\/kb\/kb-article\/saving-medium-or-large-diagrams\/","title":{"rendered":"Saving Medium or Large Diagrams"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>You may run into problems saving even medium size diagrams or ones with a high zoom level. This article describes some ways of dealing with this.<\/p>\n<h2>PDF<\/h2>\n<p>Issues with saving a single-page PDF and the solutions are described at <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/single-pdf-page-of-a-diagram\/\">Single Page PDF of a Diagram<\/a>.<\/p>\n<h2>PNG (Or Other Image Formats)<\/h2>\n<p>You may get this dialog:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-11267 lazyload\" data-src=\"https:\/\/fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/unable_to_save_diagram_dialog-300x130.png\" alt=\"\" width=\"450\" height=\"195\" data-srcset=\"https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/unable_to_save_diagram_dialog-300x130.png 300w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/unable_to_save_diagram_dialog-150x65.png 150w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/unable_to_save_diagram_dialog-768x334.png 768w, https:\/\/www.fhug.org.uk\/kb\/wp-content\/uploads\/2020\/09\/unable_to_save_diagram_dialog.png 900w\" data-sizes=\"(max-width: 450px) 100vw, 450px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 450px; --smush-placeholder-aspect-ratio: 450\/195;\" \/><\/p>\n<p>or you may just want to have more control. Below are several options you can try. They can likely be modified for other image formats, but\u00a0PNG\u00a0is used here.<\/p>\n<h3>Print with a PDF Creator that Also Saves Images<\/h3>\n<p><a href=\"https:\/\/fhug.org.uk\/kb\/link\/pdf-creator-3\/\">PDF Creator<\/a> will also save PNG and other formats instead of PDF. It avoids the issues with saving via <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">&nbspDiagram&nbsp&gt;&nbspSave&nbspAs&#8230;&nbsp<\/a> in <span class=\"fh\" style=\"font-size: 17px !important; line-height: 21.4286px !important;\">\u0192<span style=\"color:#73B262; font-weight: bold;\">h<\/span><\/span>. How to use PDFCreator to create a PDF is described at <a href=\"https:\/\/fhug.org.uk\/kb\/kb-article\/single-pdf-page-of-a-diagram\/\">Single Page PDF of a Diagram<\/a>. Follow those instructions, but in the save dialogs that come when printing, choose PNG instead of PDF.<\/p>\n<p>Note that you should use <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">File&nbsp&gt;&nbspPrint&nbspSetup<\/a> to set up the pages, and check that they are what you want using <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">File&nbsp&gt;&nbspPrint&nbspPreview<\/a> before printing with <a href=\"#!\" class=\"cs_tooltip\" fhugtt=\"This is the menu across the top of the main Family Historian windows. The &gt; denotes a submenu\">File&nbsp&gt;&nbspPrint<\/a>. You may have to move the diagram around to get it in a single page.<\/p>\n<p>By default the dpi will be 150. You can change this by editing the profile under the\u00a0Profiles\u00a0tab in PDFCreator. Change the one for\u00a0Convert.<\/p>\n<p>This method has been used to get 300 dpi\u00a0PNG\u00a0images of 16&#8242; diagrams. There may be a limit of 200&#8243;. It should work for smaller diagrams, and gives you more control of your output image than the options in Family Historian.<\/p>\n<h3>Extract the Image from a PDF<\/h3>\n<p>You can in general extract an image from a PDF, such as those created by Family Historian PDF or the PDF tools described in Single Page PDF of a Diagram. This page describes one way to do that using GhostScript.<\/p>\n<h4>GhostScript<\/h4>\n<p>You must install GhostScript from\u00a0 <a href=\"http:\/\/www.ghostscript.com\/download\/gsdnld.html\">Ghostscript for Windows (32 bit)<\/a>. The following was done with an old version of GhostScript. The details may have to be changed for a newer version.<\/p>\n<p>The command line is<\/p>\n<p><code>C:\\Program Files\\gs\\gs9.20\\bin\\gswin64c -dNOPAUSE -dBATCH -r&lt;resolution&gt; -sDEVICE=png16m -sOutputFile=\"&lt;your-output-file-name&gt; &lt;your-pdf-file-name&gt;\"<\/code><\/p>\n<p>Use the path to\u00a0GhostScript\u00a0appropriate for the version you have installed. Use 300 for the resolution unless you have reason to use something else. Specifying a higher resolution than is in the PDF will not be useful.<\/p>\n<p>In my case I wrapped the\u00a0GhostScript\u00a0command in a\u00a0C#\u00a0console app. The reason is that you can use the\u00a0Open With\u00a0menu in\u00a0File Explorer\u00a0on a\u00a0PDF\u00a0file, and it will then appear in the\u00a0Open With\u00a0menu next time, making it easy to use. I use\u00a0C#\u00a0as it makes a .exe and appears more attractive in the Open With menu. You could just as well use a\u00a0BAT\u00a0file,\u00a0PowerShell\u00a0script,\u00a0Java JAR, or other. In those cases the file extension appears in the\u00a0Open With\u00a0menu.<\/p>\n<p>My\u00a0C#\u00a0application can be found at\u00a0<a href=\"https:\/\/github.com\/KennethEvans\/VS-ConvertPdfToImage\">https:\/\/github.com\/KennethEvans\/VS-ConvertPdfToImage<\/a>. The\u00a0GhostScript\u00a0location and output directory is hard-coded and would need to be changed.<\/p>\n<p>I have used this program for many years for other uses and it seems to work. The heavy lifting is done by\u00a0GhostScript, of course, not my application, which is very simple.<\/p>\n[Written by Kenneth Evans]\n","protected":false},"template":"","fh_version":[13,14,15,739],"skill_level":[17],"topic":[724],"class_list":["post-11177","kb_article","type-kb_article","status-publish","hentry","fh_version-v4","fh_version-v5","fh_version-v6","fh_version-v7","skill_level-intermediate","topic-diagram-tips"],"_links":{"self":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article\/11177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/kb_article"}],"about":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/types\/kb_article"}],"wp:attachment":[{"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/media?parent=11177"}],"wp:term":[{"taxonomy":"fh_version","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/fh_version?post=11177"},{"taxonomy":"skill_level","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/skill_level?post=11177"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.fhug.org.uk\/kb\/wp-json\/wp\/v2\/topic?post=11177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}