Document Closed before post Processor on PDF Exporter.

Community Driven Extensions Project
Post Reply
digopim
Posts: 2
Joined: 23 Jan 2015, 02:28

17 Jul 2017, 16:09

Since v 6.1 we can not add elements (like sign's bar and images) to a pdf document generated by the exporter, cause the document is closed before the call for postProcessor method (PDFExporter.class l.141 ~ l.145).
That's any chance to make it like previous version 6.0 when the document.close() was called after postProcessor methods ... ?

User avatar
Melloware
Posts: 337
Joined: 22 Apr 2013, 15:48

17 Jul 2017, 20:13

Please report the issue on our Github...

https://github.com/primefaces-extension ... com/issues

Do you think it was related to this fix?

https://github.com/primefaces-extension ... issues/433

or could it possibly be something PF fixed in core PF?
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

digopim
Posts: 2
Joined: 23 Jan 2015, 02:28

17 Jul 2017, 21:23

I reported the Issue on git Hub like u asked.
https://github.com/primefaces-extension ... issues/468

Cause it was only a problem on PDF exporter I did not think that are any relation with the Issue 433 (xlsx Exporter Problem)
and if was un fix on PF core, i really do not get it. Why blocking adding elements after data content could be a problem.

See the code :

On 6.0

Code: Select all

if (postProcessor != null) {postProcessor.invoke(context.getELContext(), new Object[] { document });}} document.close(); writePDFToResponse(context.getExternalContext(), baos, filename);
On 6.1.1

Code: Select all

document.close(); if (postProcessor != null) {postProcessor.invoke(context.getELContext(), new Object[] { document });} writePDFToResponse(context.getExternalContext(), baos, filename);
The document is closed anyway.

User avatar
Melloware
Posts: 337
Joined: 22 Apr 2013, 15:48

17 Jul 2017, 21:59

I just committed a fix if you would like to review it.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests