In a K2 environment configured with multi authentication and a secondary runtime site, that is set to anonymous authentication, when a form with a view that calls images from a SmartObject in an attachment control is saved to PDF using the PDF control, the images are not rendered in the PDF.
This is caused when the SmartObject call is made to render the images from the secondary runtime site, and the user cannot be authenticated. The multi-authentication setup is unable to use the anonymous user and the call cannot be completed and images are not rendered when the PDF is generated.
- Ensure you have K2 4.7 installed.
- Install the K2 4.7 February 2017 Cumulative Update.
- Get the K2 4.7 February 2017 Cumulative Update FP7 from Regional Support.
- Install the K2 4.7 February 2017 Cumulative Update FP7 to apply the fix.
- Create a Secondary Runtime site with anonymous authentication.
- Test to see if the site can be accessed.
For security reasons it is recommended that you block access to this site for all users in the IIS, except for the Application Pool user.
- Navigate to the main Runtime Site’s web.config file located in [INSTALLDIRECTORY]\k2 smartforms runtime.
- Under the heading <!-- Runtime Links --> add the following entry:
<add key="Forms.Controls.SaveAsPDF.BaseURL" value="https://k2.denallix.com/RuntimeB/"/>
The URL needs to be the URL of the secondary runtime site.