Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need ability to specify name for generated PDFs #679

Open
Tracked by #2137
HauklandJ opened this issue Jun 10, 2024 · 1 comment
Open
Tracked by #2137

Need ability to specify name for generated PDFs #679

HauklandJ opened this issue Jun 10, 2024 · 1 comment
Assignees

Comments

@HauklandJ
Copy link
Contributor

HauklandJ commented Jun 10, 2024

Part of the Underskjema Epic

To support the generation of one PDF per sub form, we need a mechanism for naming PDFs to avoid name collision and to have a semantic domain-related name to easily be distinguished from others.

We should expose the naming rules to the Service Owner app developers. Could be done with expressions.

With PDF as its own taskExtension taskType, we could include a pdfConfig section which could include PdfName, something like this:

<bpmn:task id="Task_1" name="Utfylling">
      <bpmn:extensionElements>
        <altinn:taskExtension>
          <altinn:taskType>data</altinn:taskType>
        </altinn:taskExtension>
      </bpmn:extensionElements>
</bpmn:task>

<bpmn:task id="Task_2" name="Altinn pdf task">
    <bpmn:extensionElements>
        <altinn:taskExtension>
            <altinn:taskType>pdf</altinn:taskType>
            <altinn:pdfConfig>
                <altinn:pdfName>PdfNameExpressionHere</altinn:pdfName> //Hardkodet string, text resource, expression
                <altinn:tasksToIncludeInPdf>
                    <altinn:taskId>Task_1</altinn:taskId>
                </altinn:tasksToIncludeInPdf>
            </altinn:pdfConfig>
        </altinn:taskExtension>
    </bpmn:extensionElements>
</bpmn:task>

TasksToInclude: hvis det er server task så vil det ikke være noe layout set, så frontend vil ikke rendre noe.

@bjosttveit
Copy link
Member

bjosttveit commented Jun 11, 2024

The file name is determined by app-lib-dotnet, based on the appName in text resources currently it seems. So maybe this issue belongs there? Unless there is a way for app-frontend to expose this in the PDF file? Though, I suspect there is not, as we currently cannot even set the document title #196

@HauklandJ HauklandJ transferred this issue from Altinn/app-frontend-react Jun 11, 2024
@HauklandJ HauklandJ self-assigned this Jun 18, 2024
@HauklandJ HauklandJ mentioned this issue Jun 19, 2024
5 tasks
@HauklandJ HauklandJ changed the title Need ability to specify name for generated PDFs (with expressions) Need ability to specify name for generated PDFs Jun 21, 2024
@HauklandJ HauklandJ mentioned this issue Jun 27, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📈 Todo
Development

No branches or pull requests

2 participants