Warning, /documentation/digikam-doc/post_processing/print_creator.rst is written in an unsupported language. File is not indexed.
0001 .. meta:: 0002 :description: The digiKam Print Creator 0003 :keywords: digiKam, documentation, user manual, photo management, open source, free, learn, easy, print, creator, template, group, combination, layout 0004 0005 .. metadata-placeholder 0006 0007 :authors: - digiKam Team 0008 0009 :license: see Credits and License page for details (https://docs.digikam.org/en/credits_license.html) 0010 0011 .. _print_creator: 0012 0013 Print Creator 0014 ============= 0015 0016 .. contents:: 0017 0018 Overview 0019 -------- 0020 0021 The Print Creator is a tool to print grouped images at the same time. 0022 0023 This tool allows multiple images to be combined into single sheets of paper in standard photo sizes for printing. The combined images can also be automatically opened with the image editor Gimp for enhancement or for direct printing using the Gimp-Print tool. The combined images can also be output directly as **PDF** or **image** files. 0024 0025 Using the Wizard 0026 ---------------- 0027 0028 The first page allows to use the items selection method: from **Images** currently selected in digiKam, or from **Albums** hosted in your collections. This page also verify the availability of **Gimp** binary program. 0029 0030 .. figure:: images/print_creator_page1.webp 0031 :alt: 0032 :align: center 0033 0034 The Print Wizard Page to Select Items 0035 0036 The next page allows to customize the **Printing Layout**, the **List of Items** to assemble, and the **Printing Target** as: 0037 0038 - Post processing with **Gimp**. Application needs to be installed on your system. 0039 - **PDF** file. Linux has a native export to PDF support. For Windows and macOS, supplemental driver needs to be installed. 0040 - **Image** file. 0041 0042 A layout preview using selected items an the printing template is given on the left bottom side of the dialog. 0043 0044 .. figure:: images/print_creator_page2.webp 0045 :alt: 0046 :align: center 0047 0048 The Print Wizard Page to Preview Selected Items on Template Layout 0049 0050 The next page allows to customize the caption for each items, as: 0051 0052 - **No caption**. 0053 - **Image file name**. 0054 - **Exif date-time** from file metadata. 0055 - **Item comments** from file metadata. 0056 - A **Custom Format** constructed by a list of fields assembly as a string. 0057 0058 The caption **Text Color**, **Text Size**, and **Font Family** can be customized if necessary. 0059 0060 .. figure:: images/print_creator_page3.webp 0061 :alt: 0062 :align: center 0063 0064 The Print Wizard Page to Setup Captions 0065 0066 The next page allows to crop and rotate each items at the desired area before printing. You can review all items one by one before to start the print processing. 0067 0068 .. figure:: images/print_creator_page4.webp 0069 :alt: 0070 :align: center 0071 0072 The Print Wizard Page to Crop or Rotate Items 0073 0074 The last page list all necessary tasks to render printing. If you select an image or a PDF file as target, a supplemental dialog will appear to customize the last options used by the print driver, and especially the place where the file must be generated. 0075 0076 .. figure:: images/print_creator_page5.webp 0077 :alt: 0078 :align: center 0079 0080 The Print Wizard Page to Render Printing 0081 0082 .. _printcreator_newlayout: 0083 0084 Creating a New Layout 0085 --------------------- 0086 0087 The Print Creator tool allows to add new templates to manage new page layouts easily. This chapter explains how to create templates, test, and share files for an official integration in application. 0088 0089 Getting Started 0090 ~~~~~~~~~~~~~~~ 0091 0092 A template is at least one file with XML extension (for instance :file:`my-templates.xml`), if you want it to be included however you need another file that allows translations, e.g. a desktop file (see below). 0093 0094 When the Print Creator is running, it does the following: 0095 0096 - Waits from you to choose the page size. 0097 - Looks for files describing templates (XML files). 0098 - For each file, it looks for templates. If template is fine, it checks if layout fits into the chosen page size, adds it, and loads desktop file if exists. 0099 - Shows templates with a preview icon in a list box. 0100 0101 The current official templates list can be seen `in this git repository <https://invent.kde.org/graphics/digikam/-/tree/master/core/dplugins/generic/tools/printcreator/templates>`_. 0102 0103 The XML File Structure 0104 ~~~~~~~~~~~~~~~~~~~~~~ 0105 0106 The XML file is used to describe template layouts, once it was a real page layout. At now, you can add a fake page size to make it available for all those pages in which your new template fits. 0107 0108 An example of template (already included into default templates.xml) is a layout containing six passport size photos (35x40mm) is the following: 0109 0110 .. code-block:: xml 0111 0112 <templates> 0113 <paper name="passport-photos" width="90" height="130" unit="mm" > 0114 <template name="6_photos_3.5x4cm" dpi="0" autorotate="true"> 0115 <photo x="10" y="3" width="35" height="40" /> 0116 <photo x="55" y="3" width="35" height="40" /> 0117 <photo x="10" y="45" width="35" height="40" /> 0118 <photo x="55" y="45" width="35" height="40" /> 0119 <photo x="10" y="87" width="35" height="40" /> 0120 <photo x="55" y="87" width="35" height="40" /> 0121 </template> 0122 </paper> 0123 </templates> 0124 0125 The **paper** element represents the template layout, important attributes are width, height and unit: 0126 0127 - **width** attribute: Represents the layout width. 0128 - **height** attribute: Represents the layout height. 0129 - **unit** attribute: Explains in which units width and height are, it can be inches or inch, mm, or cm. 0130 0131 The **template** element is the real template definition and contains the photo positions. Attributes are: 0132 0133 - **name** attribute: It is the template's name. It's used to get translations at run-time set from a desktop file-name ( :file:`6_photos_3.5x4cm.desktop` in the example). If the desktop file-name does not exist, the name attribute is shown. 0134 - **autorotate** attribute: Sets if autorotation must be done. 0135 - **photo** element: Sets photo position (x and y attributes) and size (width and height attributes). 0136 0137 See below another example for **A6 page size**: 0138 0139 .. code-block:: xml 0140 0141 <paper name="A6" width="105" height="148" unit="mm" > 0142 <template name="1_photo_9x13cm" dpi="0" autorotate="true"> 0143 <photo x="5" y="10" width="90" height="130" /> 0144 </template> 0145 <template name="1_photo_10.5x14.8cm" dpi="0" autorotate="true"> 0146 <photo x="0" y="0" width="105" height="148" /> 0147 </template> 0148 </paper> 0149 0150 The Desktop File 0151 ~~~~~~~~~~~~~~~~ 0152 0153 The desktop file is needed for translations. If you use your templates for your own, you don't really need it. It's a standard ini-style file and looks like this (for instance :file:`1_photo_9x13cm`): 0154 0155 .. code-block:: ini 0156 0157 [Desktop Entry] 0158 Type=Theme 0159 Name=9x13 cm (1 photo) 0160 Name[da]=9x13 cm (1 foto) 0161 Name[de]=9x13 cm (1 Foto) 0162 Name[en_GB]=9x13 cm (1 photo) 0163 Name[et]=9x13 cm (1 foto) 0164 Name[gl]=9x13 cm (1 foto) 0165 Name[it]=9×13 cm (1 foto) 0166 Name[nb]=9x13 cm (1 bilde) 0167 Name[nl]=9x13 cm (1 foto) 0168 Name[pt]=9x13 cm (1 fotografia) 0169 Name[pt_BR]=9x13 cm (1 foto) 0170 Name[sv]=9 x 13 cm (1 foto) 0171 Name[x-test]=xx9x13 cm (1 photo)xx 0172 0173 The nice thing is that when your layout get integrated into Print Creator tool default templates, translators teams will translate the desktop file for you. 0174 0175 Creating new Template from Another One 0176 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0177 0178 The easiest way to get started is to copy templates.xml file and modify it. Templates folder can be found usually under **Linux** at :file:`/usr/share/apps/digikam/templates/`. Writing in this folder requires root access, so we will not create our template there, Instead do the following from a console: 0179 0180 - Create a template folder in your home directory: 0181 0182 .. code-block:: shell 0183 0184 mkdir -p ~/.config/share/apps/digikam/templates/ 0185 0186 - Go to this directory: 0187 0188 .. code-block:: shell 0189 0190 cd ~/.config/share/apps/digikam/templates/ 0191 0192 - Copy the :file:`templates.xml` to :file:`my_templates.xml` for instance: 0193 0194 .. code-block:: shell 0195 0196 cp -r /usr/share/digikam/templates/templates.xml ~/.config/share/apps/digikam/templates/my_templates.xml 0197 0198 - Remove all pages and add yours then create the desktop file accordingly. 0199 0200 You are done, you can now open digiKam and start the tool, your new templates should appear in the **Layouts** list from the **Select page layout** wizard dialog page. 0201 0202 Final Words 0203 ~~~~~~~~~~~ 0204 0205 This is the end of this chapter, now is the time for you to get creative and add new templates. 0206 0207 When you are done, do not hesitate to propose your work for an official integration in digiKam, to see your new layout included in the official list. See the `Contribute page <https://www.digikam.org/contribute/>`_ from the digiKam project web-site for details.