Changes for page Print-Service-Plugin


From version 10.13
edited by awa
on 05.09.2022, 12:30
Change comment: There is no comment for this version
To version 10.1
edited by awa
on 14.06.2022, 13:52
Change comment: Add changelog

Summary

Details

Page properties
Content
... ... @@ -177,8 +177,8 @@
177 177  The described steps are only a workaround and the environment variables should be set back to the default values after the successful installation!
178 178  
179 179  {{code language="none"}}
180 -PS C:\test> $env:NODE_TLS_REJECT_UNAUTHORIZED = 0
181 -PS C:\test> npm set strict-ssl false
180 +PS C:\test> $env:NODE_TLS_REJECT_UNAUTHORIZED = 0
181 +PS C:\test> npm set strict-ssl false
182 182  {{/code}}
183 183  
184 184  == Usage and options ==
... ... @@ -194,37 +194,14 @@
194 194  ; Zoom factor
195 195  : Scale factor for the form. Use this to magnify or scale down very large or very small forms.
196 196  ; Blank form
197 -: (requires at least print plugin version 4.2.0 and print service version 1.4.0) 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.
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 198  ; User groups
199 199  : 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.
200 200  ; URL parameter
201 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.
202 202  
203 -== CSS adjustments ==
203 +== CSS-Anpassungen für Druckbild ==
204 204  
205 -General CSS adjustments can be done via a corresponding media query:
206 -
207 -{{code language="css"}}
208 -@media print {
209 - /* general CSS for printing */
210 -}
211 -{{/code}}
212 -
213 -Please note this CSS is applied in other printing contexts as well, e.g. when the user prints the form via the browser directly.
214 -
215 -There are a few special CSS classes available that are set only when the print service is used. These classes are always added to the //form.xm-form// element.(requires at least print plugin version 4.2.0 and print server plugin 1.4.0).
216 -
217 -; xm-print
218 -: This CSS class is always set.
219 -; xm-print~-~-mode-plain
220 -: Added when print mode is set to //Preserve form fields//.
221 -; xm-print~-~-mode-dynamic
222 -: Added when print mode is set to //Convert form fields to text//.
223 -; xm-print~-~-style-filled
224 -: Added when the option //blank form// is disabled.
225 -; xm-print~-~-style-blank
226 -: Added when the option //blank form// is enabled.
227 -
228 228  === Input elements ===
229 229  
230 230  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.
... ... @@ -313,109 +313,39 @@
313 313  
314 314  In fonts of type //TrueType// and //OpenType// information about the embeddability of the font can be stored directly. Depending on what is configured there, a font may not be embeddable and will instead be rendered by the //Print-Service-Plugin// only as a vector graphic in the created PDF documents.
315 315  
316 -== JavaScript adjustments ==
317 -
318 -Sometimes you may have to execute custom JavaScript code before the form is printed. For this, you can use the function //$.xutil.onPrint//. Its signature is as follows:
319 -
320 -{{code language="text"}}
321 -function onPrint(callback: () => Promise<void> | void): void
322 -{{/code}}
323 -
324 -This function lets you register one or more callbacks that are run before the form is printed. When a callback returns a promise, the print server waits until the promise fulfills before proceeding with the printing. In case the promise gets rejected, the error is logged, but the print is not aborted. Please note that you must register the callback before the form is printed, e.g. within a JQuery document-ready-handler (//$(callback)//).
325 -
326 -For example, to run an AJAX request and wait for it to finish before the form is printed:
327 -
328 -{{js}}
329 - $.xutil.onPrint(async () => {
330 - const response = await fetch("http://some-url.de");
331 - // do something with response
332 - });
333 -{{/js}}
334 -
335 -{{jsIE}}
336 - $.xutil.onPrint(function() {
337 - return new Promise(function(resolve, reject) {
338 - $.ajax("http://some-url.de", {
339 - success: function(data, textStatus, jqXHR) {
340 - // Do something with the response data
341 - resolve(undefined);
342 - },
343 - error: function(jqXHR, textStatus, errorThrown) {
344 - reject("HTTP request error: " + textStatus + " - " + errorThrown);
345 - },
346 - });
347 - });
348 - });
349 -{{/jsIE}}
350 -
351 351  == Changelog
352 352  
353 -=== Plugin
295 +=== 4.2.0
354 354  
355 -==== 4.2.3
356 -
357 -* Fix: Special characters in combobox select options are now displayed correctly in the printed PDF document
358 -
359 -==== 4.2.2
360 -
361 -* Fix: When a textarea is set to adjust its height automatically to its content, the height is now recalculated once before the form is printed.
362 -
363 -==== 4.2.1
364 -
365 -* Fix: Show correct version of the print server when performing a check
366 -
367 -==== 4.2.0
368 -
369 369  * feature: New option //blank form//
370 -* feature: Add special CSS classes to the //form.xm-form// such as //xm-print//
371 371  * change: When an element is marked as hidden during print in the form designer (advanced -> Word and PDF export options), the element is now hidden when the print service is used as well. This feature requires at least {{formcycle/}} version 7.0.14.
372 372  * change: Applicable only when //print mode// is set to //dynamic//: When an input field did not have a value, its placeholders was shown instead. This was changed so that no value is shown when the input field does not have a value.
373 373  * change: Applicable only when //print mode// is set to //dynamic//: When a select field displayed as a dropdown menu did not have a value, the text //Please select// was shown instead. This was changed so that no text is shown anymore when the select field does not have a value.
374 374  
375 -==== 4.1.2
302 +=== 4.1.2
376 376  
377 377  * Added note regarding //$.xutil.onPrint// to the plugin UI.
378 378  
379 -==== 4.1.1
306 +=== 4.1.1
380 380  
381 381  * Requires at least {{formcycle/}} 7.0.4.
382 382  * change: Note regarding required field is not shown anymore.
383 383  * fix: Show the date format immediately
384 384  
385 -==== 4.1.0
312 +=== 4.1.0
386 386  
387 387  * Added a new option for selecting the workflow state used during printing. When no state is selected, the current state of the form record is used as in previous version.
388 388  * Configured user groups are saved correctly.
389 389  
390 -==== 4.0.2
317 +=== 4.0.2
391 391  
392 392  * feature: Added a new timeout option that defaults to 30 seconds. When the print service cannot be reached, the workflow may never complete otherwise.
393 393  
394 -==== 4.0.1
321 +=== 4.0.1
395 395  
396 -* fix: The PDF document that was created was not attached to the form record (only for the new workflow action).
323 +* fix: The PDF document tha was created was not attached to the form record (only for the new workflow action).
397 397  
398 -==== 4.0.0
325 +=== 4.0.0
399 399  
400 400  * Adjustments for {{formcycle/}} version 7.
401 401  
402 -=== Server
403 -
404 -==== 1.5.1
405 -
406 -* Update node-windows dependency
407 -
408 -==== 1.5.0
409 -
410 -* Update to Chromium 105.0.5173.0
411 -* Requires at least Node.JS version 14 or higher
412 -
413 -==== 1.4.1
414 -
415 -* Fix windows service install / uninstall script (//install-windows-service.js// and //uninstall-windows-service.js//)
416 -
417 -==== 1.4.0
418 -
419 -* When an error occurs while printing, that error is returned as part of the HTTP response
420 -* The print server can now be used for printing arbitrary pages / URLs. JavaScript and CSS that must be run in the context of the page to print can be passed as part of the HTTP request.
421 -* The //~/pdf// endpoint without parameters returns a quick summary of the server status