Print Creator¶
Panoramica¶
The Print Creator is a tool to print a group of images at the same time.
This tool allows multiple images to be combined onto 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.
Usare la procedura guidata¶
The first page allows you to select the items to print, either from Images currently selected in digiKam, or from Albums hosted in your collections. This page also checks for the availability of the Gimp binary program.
The next page allows to you customize the Printing Layout, the List of Items to assemble, and the Printing Target. Three print targets can be selected:
Post processing with Gimp, which must be installed on your system.
PDF file. Linux has a native export to PDF support, as does MacOS. A supplemental driver may need to be installed for Windows.
file immagine
A layout preview using selected items and the printing template is displayed on the right bottom side of the dialog.
The next page allows you to customize the caption for each item. Options include:
nessuna didascalia
nome file dell’immagine
data e ora Exif dai metadati del file
commenti sugli elementi dai metadati del file
A Custom Format constructed by a list of fields assembled into a string.
Possono essere personalizzati il colore, la dimensione e il tipo di carattere del testo, se necessario.
The next page allows you to crop and rotate each item to the desired area before printing. You can review all items one by one before starting the print processing.
The last page lists 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 is to be stored.
Creare una nuova disposizione di stampa¶
The Print Creator tool allows you to add new templates and manage new page layouts. This chapter explains how to create templates, test, and share files for an official integration into digiKam.
Primi passi¶
A template is at least one file with an XML extension (for instance my-templates.xml
). However, if you want it to be included in a future version of digiKam, you need another file that allows translations, e.g. a desktop file (see below).
Quando il Creatore di stampa è in esecuzione, esegue le operazioni seguenti:
Waits for you to choose the page size.
Looks for files describing the templates (XML files).
For each file, it looks for a template. If a template is found, it checks if the layout fits into the chosen page size, adds it, and loads a desktop file if one exists.
Displays templates with a preview icon in a list box.
L’elenco attuale ufficiale dei modelli si trova in questo deposito git.
La struttura del file XML¶
An XML file is used to describe template layouts and how it fits into a real page layout. For now, you can add a fake page size to make your template available for all those pages in which your new template fits.
An example of a template (already included in default templates.xml) is a layout containing six passport size photos (35x40mm):
<templates>
<paper name="passport-photos" width="90" height="130" unit="mm" >
<template name="6_photos_3.5x4cm" dpi="0" autorotate="true">
<photo x="10" y="3" width="35" height="40" />
<photo x="55" y="3" width="35" height="40" />
<photo x="10" y="45" width="35" height="40" />
<photo x="55" y="45" width="35" height="40" />
<photo x="10" y="87" width="35" height="40" />
<photo x="55" y="87" width="35" height="40" />
</template>
</paper>
</templates>
L’elemento paper rappresenta l’impaginazione del modello, gli attributi importanti sono width, height e unit:
attributo width: rappresenta la larghezza della disposizione
attributo height: rappresenta l’altezza della disposizione
unit attribute: Specifies the units for width and height. Valid values are inches or inch, mm, or cm.
L’elemento template è la vera definizione del modello e contiene le posizioni delle foto. Gli attributi sono:
name attribute: is the template’s name, that is used to get translations at run-time set from a desktop file-name (
6_photos_3.5x4cm.desktop
in the example). If the desktop file-name does not exist, the name attribute is shown.autorotate attribute: Sets if autorotation must be performed.
elemento photo: imposta la posizione delle foto (attributi x e y) e la dimensione (attributi width e height)
Another example is presented below for A6 page size:
<paper name="A6" width="105" height="148" unit="mm" >
<template name="1_photo_9x13cm" dpi="0" autorotate="true">
<photo x="5" y="10" width="90" height="130" />
</template>
<template name="1_photo_10.5x14.8cm" dpi="0" autorotate="true">
<photo x="0" y="0" width="105" height="148" />
</template>
</paper>
Il file Desktop¶
The desktop file is needed for translations. If you produce templates strictly for your own use, you don’t really need it. It’s a standard ini-style file and looks like this (for instance 1_photo_9x13cm
):
[Desktop Entry]
Type=Theme
Name=9x13 cm (1 photo)
Name[da]=9x13 cm (1 foto)
Name[de]=9x13 cm (1 Foto)
Name[en_GB]=9x13 cm (1 photo)
Name[et]=9x13 cm (1 foto)
Name[gl]=9x13 cm (1 foto)
Name[it]=9×13 cm (1 foto)
Name[nb]=9x13 cm (1 bilde)
Name[nl]=9x13 cm (1 foto)
Name[pt]=9x13 cm (1 fotografia)
Name[pt_BR]=9x13 cm (1 foto)
Name[sv]=9 x 13 cm (1 foto)
Name[x-test]=xx9x13 cm (1 photo)xx
The nice thing is that when your layouts get integrated into the Print Creator tool default templates, translation teams will translate the desktop file for you.
Creating a New Template from An Existing Template¶
The easiest way to get started is to copy templates.xml file and modify it. The templates folder can be found usually under Linux at /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:
Creazione di una cartella del modello nella tua cartella home:
mkdir -p ~/.config/share/apps/digikam/templates/
Vai alla cartella:
cd ~/.config/share/apps/digikam/templates/
Copia il file
templates.xml
inmy_templates.xml
, per esempio:
cp -r /usr/share/digikam/templates/templates.xml ~/.config/share/apps/digikam/templates/my_templates.xml
Remove all pages, add your pages, then create the desktop file accordingly.
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.
Considerazioni finali¶
Siamo arrivati alla fine di questo capitolo, ora è tempo di essere creativi e aggiungere nuovi modelli.
When you are done, do not hesitate to submit your work for official integration in digiKam, to see your new layout included in the official list. See the Contribute page from the digiKam project web-site for details.