Changes for page Print-Service-Plugin


From version 4.1
edited by gru
on 02.09.2021, 08:01
Change comment: There is no comment for this version
To version 9.1
edited by awa
on 13.06.2022, 18:29
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.gru
1 +XWiki.awa
Content
... ... @@ -1,5 +1,9 @@
1 1  [[**Plugin-Download**>>url:https://customer.formcycle.eu/index.php/apps/files/?dir=/FORMCYCLE%20-%20Plugins%20Customer/fc-plugin-print-service&fileid=8194||rel="noopener noreferrer" target="_blank"]] (requires login)
2 2  
3 +{{info}}
4 +{{formcycle/}} Version 7 requires the //Print-Service// plugin version to be **4.0.0** or higher.
5 +{{/info}}
6 +
3 3  {{content/}}
4 4  
5 5  The plugin //Print Services// is available separately and lets you create a PDF document from a form that is optimized for printing. This plugin is subject to additional charge.
... ... @@ -88,7 +88,7 @@
88 88  
89 89  Translated with www.DeepL.com/Translator (free version)
90 90  
91 -==== Uninstall ====
95 +=== Uninstall ===
92 92  
93 93  To uninstall the Print Server, open a command line (cmd) with administrative privileges and execute the following commands:
94 94  
... ... @@ -110,9 +110,10 @@
110 110  
111 111  ==== Print-Service Plugin Installation ====
112 112  
113 -In order for the plugin to be available in {{formcycle/}} as an action in the workflow processing, it must be deployed in the System Plugin section of the management interface. Instructions for installing plugins can be found [[here>>doc:Formcycle.UserInterface.Client.Plugins.WebHome]].
117 +In order for the plugin to be available in {{formcycle/}} as an action in the workflow, it must be deployed in the System Plugin section of the management interface. Instructions for installing plugins can be found [[here>>doc:Formcycle.UserInterface.Client.Plugins.WebHome]].
114 114  
115 115  If the old version of the print service plugin (phantom plugin) was already installed, the following procedure is recommended for installation:
120 +
116 116  * Disable the phantom plugin
117 117  * Delete the phantom plugin
118 118  * Upload new print service plugin
... ... @@ -126,12 +126,20 @@
126 126  
127 127  For example: {{code language="none"}}http://localhost:8089/pdf{{/code}}
128 128  
129 -This completes the setup of the print service plugin and it is available as an action in the [[workflow processing>>doc:Formcycle.UserInterface.MyForms.WorkflowProcessing]].
134 +This completes the setup of the print service plugin and it is available as an action in the [[workflow processing>>doc:Formcycle.Designer.Workflow.WebHome]].
130 130  
131 -=== Troubleshooting ===
136 +== Troubleshooting ==
132 132  
133 -==== Command npm install leads to timeout ====
138 +=== Command npm not found ===
134 134  
140 +Under Windows it is possible that after the NodeJS installation the environment variables are not set correctly and so npm install cannot be executed. This was also the case if the default path under C:/Programs was not used during the NodeJS installation. So check in the path if these are existing. The following must be done for this:
141 +
142 +* Call up the environment variables via Control Panel > System > Advanced System Settings > Environment Variables button.
143 +* In Path you should find the following entries: {{info}}C:\Users\{username}\AppData\Roaming\npm;C:\Program Files\nodejs{{/info}}
144 +* Confirm everything with Ok. The console then be opened again with admin rights.
145 +
146 +=== Command npm install leads to timeout ===
147 +
135 135  If the npm install command does not work due to a proxy, then the general proxy setting is not sufficient. Therefore, the following must be executed via console:
136 136  
137 137  {{code language="none"}}
... ... @@ -148,20 +148,18 @@
148 148  
149 149  More information can also be found here: http://www.fladi.de/2014/02/06/howto-npm-hinter-einem-proxy-verwenden/
150 150  
151 -==== Printing does not work ====
164 +=== Printing does not work ===
152 152  
153 153  If printing via {{formcycle/}} is not possible, the cause could be that the print service is not reachable. This can be solved by the loopback URL. Under System > General > Loopback URL, loopback base URL: {{code language="none"}}http://localhost:<port>/formcycle{{/code}}
154 154  
155 -==== PDF is printed, but the message 404 appears ====
168 +=== PDF is printed, but the message 404 appears ===
156 156  
157 157  In this case the print service works correctly because a PDF is already created. It must be checked whether the loopback URL is entered correctly so that the URL to the print service is resolved correctly.
158 158  
159 -==== Downloading Chromium fails ====
172 +=== Downloading Chromium fails ===
160 160  
161 161  The following error message appears on the console after running "npm install":
162 -{{code language="none"}}
163 -Error: unable to verify the first certificate
164 -{{/code}}
175 +{{code language="none"}}Error: unable to verify the first certificate{{/code}}
165 165  
166 166  The described steps are only a workaround and the environment variables should be set back to the default values after the successful installation!
167 167  
... ... @@ -174,23 +174,26 @@
174 174  
175 175  To use this plugin, go to the workflow processing configuration, click on new action and select this plugin. The following options are used to configure the plugin action:
176 176  
177 -; **File name**
188 +; File name
178 178  : File name of the created PDF document.
179 -; **Print mode**
190 +; Print mode
180 180  : Input elements as text: Input elements are converted into plain text fields and the form is adapted to the width of the page.
181 -; **Print mode**
182 -: Web view: No changes are made to the form and it is converted so that it looks as closely as it does in a web browser as possible.
183 -; **Zoom factor**
184 -: Factory by which the form is scaled. Use this to magnify or scale down very large or very small forms.
185 -; **User groups**
192 +; Print mode
193 +: By default, are form fields such as input fields and select fields are converted to plain text. If you choose to disable this conversion, no changes are made to the form and it is printed so that it looks as closely as it does in a web browser as possible.
194 +; Zoom factor
195 +: Scale factor for the form. Use this to magnify or scale down very large or very small forms.
196 +; Blank form
197 +: Can be used to create PDF documents that can be printed out and filled out manually with a pen. When enabled, all form field values are cleared and all hidden fields are shown. In addition, the maximum number of element repetitions are created.
198 +; User groups
186 186  : A virtual user is created when opening the form with Selenium. Select the user groups here to which this virtual user should belong to. Form elements can be configured to be displayed or editable only for certain user groups.
187 -; **URL parameter**
188 -: Additional URL parameters added to the URL used when opening the form with Selenium. You can use URL parameters to [[prefill form fields>>Formcycle.FormDesigner.URLParameter]] or access them from within JavaScript.
200 +; URL parameter
201 +: Additional URL parameters added to the URL used when opening the form with Selenium. You can use URL parameters to [[prefill form fields>>Formcycle.Designer.Form.URLParameter]] or access them from within JavaScript.
189 189  
190 190  == CSS-Anpassungen für Druckbild ==
204 +
191 191  === Input elements ===
192 192  
193 -To optimize the form for printing, form elements of type [[input field>>Formcycle.FormDesigner.FormElements.Input]], [[text area>>Formcycle.FormDesigner.FormElements.Textarea]] und [[select>>Formcycle.FormDesigner.FormElements.Selection]] (Drop-Down) may be converted to plain text fields, if the print mode is set to Input elements as text.
207 +To optimize the form for printing, form elements of type [[input field>>Formcycle.Designer.Form.FormElements.Input]], [[text area>>Formcycle.Designer.Form.FormElements.Textarea]] und [[select>>Formcycle.Designer.Form.FormElements.Selection]] (Drop-Down) may be converted to plain text fields, if the print mode is set to Input elements as text.
194 194  
195 195  Additionally, the CSS classes //print// and //XSpan// are added to the converted input element that can be used for styling them. For example, in order to change the font size, you can use the following CSS:
196 196  
... ... @@ -223,6 +223,29 @@
223 223  }
224 224  {{/code}}
225 225  
240 +=== Avoid page break ===
241 +
242 +The default setting for printing is that a page break is inserted after each page of the form:
243 +
244 +{{code language="css"}}
245 +@media print {
246 + .CXPage:not(:first-child ), .page-break {
247 + display: block !important;
248 + page-break-before: always;
249 + }
250 +}
251 +{{/code}}
252 +
253 +In order to avoid breaks, the following rule needs to be defined in the CSS tab of the form:
254 +
255 +{{code language="css"}}
256 +@media print {
257 + .CXPage:not(:first-child ) {
258 + page-break-before: avoid;
259 + }
260 +}
261 +{{/code}}
262 +
226 226  === Usage of other fonts ===
227 227  
228 228  ==== Technical requirements ====