Local development
How to configure the generation of PDF on local development environment
- Set up localtest according to the description in app-localtest
- When you get to step 2 - add the pdf profile to your docker command
This ensures the new pdf service is created.docker compose --profile pdf --profile localtest up -d --build
- Add
PdfGenerationSettings
to you appsettings.Development.json file"PdfGeneratorSettings": { "ServiceEndpointUri": "http://local.altinn.cloud/pdfservice/pdf", "AppPdfPageUriTemplate": "http://{hostName}/{appId}/#/instance/{instanceId}?pdf=1", "WaitForSelector": "#readyForPrint" }
- Change the HostName under GeneralSettings in appsettings.json
This used to say
"GeneralSettings": { "HostName": "local.altinn.cloud" }
altinn3local.no
, but should be the same as the url used to access localtest environment. This could also be added in the appsettings.Development.json instead of appsettings.json as it is a dev setting. - Enable the new PDF Service
"FeatureManagement": { "NewPdfGeneration": true }