Polish | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tutaj zostały zebrane wszelkie informacje dot. poprawnego szablonu w formacie DOCX na podstawie którego można wygenerować dokument PDF.
Dokumentacja szablonu w Java APIGenerowanie PDF - nadal obowiązująca jest znaczna część opisu dot. tworzenia szablonów na podstawie których są generowane pdf'y. Uaktualniona dokumentacjaSzablon to plik zapisany w formacie DOCX umożliwiający generowanie dokumentu na jego podstawie. Szablon można dodać w administracji systemu: Administracja -> Obieg dokumentów -> Procesy -> (wybrać proces) -> Edycja -> Szablony dokumentów.
Typy generowania PDF
Przykładowy szablon do zaprezentowania działania. Tabela dynamiczna została wyróżniona kolorem. Szablon posłuży do wygenerowania dokumentu z powyższego formularza. Wygenerowany dokument. Tworzenie szablonuTworzenie szablonu należy zacząć od utworzenia pliku z rozszerzeniem .docx. W szablonie należy korzystać tylko z czcionek z rozszerzeniem ttf. Zmienne są uzupełniane na podstawie ich nazw w formularzu oraz muszą się znaleźć pomiędzy dwoma znacznikami '@'. PRZYKŁAD @kwota_brutto@ zostanie uzupełniona aktualną wartością zmiennej "kwota_brutto", która znajduje się na formularzu, w tym przypadku będzie to: 3000. Pełna nazwa użytkownika (od wersji DO UZUPEŁNIENIA)Istnieje możliwość pobrania imienia i nazwiska użytkownika, którego login mamy dostępny w kontekście formularza(lub dodaliśmy mapping o podanym kluczu). Aby uzupełnić miejsce na formularzu pełną nazwą użytkownika, należy użyć frazy "@fullusername#zmienna_z_loginem@", gdzie "zmienna_z_loginem" to id zmiennej formularza/klucz mappingu, która przechowuje wartość loginu. Ta fraza nie może być wykorzystana przy ustalaniu nagłówka kolumny przy pomocy "|". PRZYKŁADNa formularzu istnieje zmienna o id "uzytkownik", która przechowuje login interesującego nas użytkownika(np. jkowal). W przypadku wpisania w szablonie dokumentu frazy "@fullusername#uzytkownik@" generator dokumentu wyszuka Tabele dynamiczneTabele dynamiczne są to tabele mogące zawierać różną ilość wierszy w zależności od ilości danych na formularzu. Funkcja automatycznie rozpozna, która utworzona na szablonie tabela jest dynamiczna, jeśli zostanie odpowiednio utworzona. Tabela dynamiczna powinna zawierać dwa wiersze. Pierwszy pełni rolę nagłówka, gdzie każda komórka powinna zawierać nazwę zmiennej umieszczoną pomiędzy dwoma znacznikami '@', np. @konto@. Nazwy zmiennych można zastąpić własnym tekstem poprzez umieszczenie znaku ' | ' pomiędzy nazwą zmiennej a wprowadzonym tekstem. Drugi wiesz powinien zostać wypełniony dużą literą 'T'. Jeżeli nagłówek tabeli ma zostać ukryty należy użyć litery 'H'. Dodanie tła w nagłówku tabeli ma na celu podkreślenie, iż jest to tabela dynamiczna. Formatowanie nie wpływa na działanie programu. PRZYKŁAD
Przykładowo wypełniona tabelka dynamiczna w systemie. Tabele dynamiczne w szablonie. Dolna tabela po wygenerowaniu nie będzie posiadać nagłówka.
Umieszczanie w dokumencie wybranych elementów z procesuOd wersji 3.2.165 istnieje możliwość umieszczenia w dokumencie szczegółowych informacji na temat komentarzy z procesu, dokumentów podłączonych do procesu oraz historii procesu. W szablonie należy umieścić klucz odpowiadający elementowi formularza, który zostanie umieszczony w dokumencie. Dostępne są następujące klucze:
|
JIRA | ||||||||
---|---|---|---|---|---|---|---|---|
|
Dla domyślnych znaczników I(Szerokość,Wysokość), kolejne grafiki będą umieszczane jeden po drugim. Dla lepszej konfiguracji został dodany 3 parametr "Maksymalna ilość grafik w wierszu" . Parametr ten określa ile maksymalnie grafik ma być wyświetlone w rzędzie. Gdy liczba grafik jest większa to następuje załamanie i kolejne grafiki wstawiane są poniżej (Wszystko w tej samej komórce). Domyślnie wartość tego parametru wynosi 1. Dla wartości 0 w rzędzie wyświetla się tyle grafik ile jest. Istnieję też możliwość ustawienia znacznik I(,,X) gdzie X jest liczbą całkowitą większą lub równą 0. Ten znacznik zachowuję się tak samo jak I, tylko można określić ilość grafik. Pomiędzy grafikami w rzędzie jest stawiony tabulator w celu odseparowania grafik.
Przykładowy szablon
Dane wejściowe z formularza
Przykładowy wygenerowany dokument na podstawie tego szablonu
English | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Instructions - Document templates Here are collected all the information about the correct template in DOCX format on the basis of which is possible to generate a PDF document.
Template documentation in the Java APIPDF Creating - nthere is still valid a significant part of the description regarding the creation of templates based on which pdfs are generated. Updated documentationA template is a file saved in DOCX format that allows to generate a document based on it. The template can be added in the system administration: Administration -> ~Document Workflow -> Processes -> (choose a process) -> Edit -> Document templates.
PDF generation types
An exemplary template for presenting the action. The dynamic table was highlighted in color. The template will be used to generate a document from the above form. Generated document. Templates creatingA template creating should start with creating a file with the extension .docx. Variables are completed based on their names in the form and must be between two markers '@'. EXAMPLE @ gross amount @ will be completed with the current variable value "gross_amount", which is on the form, in this case it will be: 3000. Full username (from version TO BE COMPLETED)It is possible to download the user name and surname whose login we have available in the form context (or we added a mapping with the given key). To complete the place on the form with the full username, use the phrase "@fullusername#variable_with_login @", where "variable_with_login" is the id of form variable/mapping key, which stores the login value. This phrase can not be used to set the column header with "|". EXAMPLEOn the form is variable with the id "user" which stores the user login which you are interested in (eg jkowal). In case of enter the phrase "@fullusername#user@" in the document template, the document generator will search user with the login jkowal and in this place the full username will be returned: "Jan Kowalski". Dynamic tables Dynamic tables are the tables that can contain different number of rows depending on the data amount on the form. The function will automatically recognize which table created on the template is dynamic, only if it is created properly. The dynamic table should contain two lines. The first is as a header, where each cell should contain the variable name placed between two '@' tags, e.g. @account@. Variable names can be replaced with own text by placing the '|' character 'between the variable name and the entered text. The second row should be filled with a capital letter 'T'. If the table header is to be hidden, the capital letter 'H' should be used. Adding a background in the table header underlines that it is a dynamic table. Formatting does not affect the operation of the program. EXAMPLE
For example, a filled dynamic table in the system. Dynamic tables in the template. The bottom table will not have a header after it has been generated.
Placing selected elements from the process in the documentFrom version 3.2.165 it is possible to place in the document detailed information about process comments, documents attached to the process and history of the process. Template should contain proper key corresponding to the form element that will be placed in the document. The following keys are available:
|
JIRA | ||||||||
---|---|---|---|---|---|---|---|---|
|
For default I tags (Width, Height), the next images will be placed one after one. For better configuration, third parameter "Maximum number of graphics per line"has been added. This parameter determines how many graphics should be displayed in a row. When the number of graphics is bigger, a break occurs and next graphics are inserted below (All in the same cell). Defaulty this parameter value is 1. For a value of 0, in a row displays as many graphics as it is. There is also the option of setting the I(,,X)tag, where Xis an integer greater than or equal to 0. This tag behaves the same as I, only the number of graphics can be determined. Between the graphics in the row a tab is placed to separate the graphics.
Sample template
Input data from the form
An example of a generated document based on this template
...