We have a requirement to enable opening a PDF document at a specific page. Currently, we utilize the SendFile function to stream the file content to the user’s browser. However, we need the capability to control the initial page displayed when the PDF is opened.
Because the URL is generated internally within Pega, we are unable to append the #page=x parameter to the end of the URL to achieve this behavior.
Any guidance or suggestions on how to address this limitation would be greatly appreciated.
This feature is not available in OOTB Constellation architecture. If you’re on Constellation architecture, this could be done with Custom DX component to open the pdf document on a specific screen.
If you are using SendFile, the main limitation is that the PDF is streamed directly by Pega, so you typically do not get a browser-facing URL that you can decorate with #page=x. SendFile by itself usually will not let you control the initial page
Can you try to expose the PDF through a URL that the browser can open directly, then append #page= on the client side. This is the standard approach supported by common PDF viewers in Chrome/Edge. Make sure the response is opened inline as PDF (Content-Type: application/pdf, Content-Disposition: inline) if you want browser preview rather than download. If you cannot control the URL at all, consider generating a small HTML wrapper or iframe page that points to the PDF URL with the #page= fragment. If browser behavior is inconsistent, another fallback is to set the initial destination/page inside the PDF itself before serving it. Browser support for fragments can vary by viewer, especially in Firefox.