You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a long form with many questions, where the user often only changes radio-button values on a few. We have therefore added dynamic hiding in the produced PDF of all fields in the schema that is unchanged (Possible answers are Yes, No, Unchanged).
The problem that we face is that the PDF is still created with room for all the fields that has been hidden and we get a PDF with eight blank pages that otherwise would have contained the answers.
Let all the radiobutton choices regarding fullmakt stay unchanged
Send in schema
Download pdf and observe that the pdf has a lot of blank pages.
Analysis
Ater studying the source code for the PdfHandler implemented in the app in question.
Seems the issue is simple to fix through the code.
There is a possibility of excluding full pages in addition to the form components.
By re-writing the logic when components are hidden to check if the isn't any content left on the page,
the page can simple be excluded.
@hflateland commented on Fri Mar 11 2022
We have a long form with many questions, where the user often only changes radio-button values on a few. We have therefore added dynamic hiding in the produced PDF of all fields in the schema that is unchanged (Possible answers are Yes, No, Unchanged).
The problem that we face is that the PDF is still created with room for all the fields that has been hidden and we get a PDF with eight blank pages that otherwise would have contained the answers.
Screenshot:

Example file:
Forespørsel om endring av vergefullmakt (6).pdf
Steps to reproduce:
Analysis
Ater studying the source code for the PdfHandler implemented in the app in question.
Seems the issue is simple to fix through the code.
There is a possibility of excluding full pages in addition to the form components.
By re-writing the logic when components are hidden to check if the isn't any content left on the page,
the page can simple be excluded.
old logic:
new logic
new logic results in this pdf

This issue seems to be partly related to Altinn/app-frontend-react#790
The text was updated successfully, but these errors were encountered: