After upgrading to version 15.0.1, getting error in production environment. These are the error sequence
1. Requested URL is not a PDF screen at OutSystems.NssUltimatePDF_Service.BrowserExecution.UltimatePDFExecutionContext.<PrintPDF>d__11.MoveNext()--- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at OutSystems.PuppeteerPool.Utils.AsyncUtils.Wait[T](Task`1 task) at OutSystems.PuppeteerPool.Utils.AsyncUtils.StartAndWait[T](Func`1 async) at OutSystems.NssUltimatePDF_Service.CssUltimatePDF_Service.MssPrintPDF(String ssURL, String ssHost, String ssTemporaryFolder, String ssProduct, String ssRevision, RCViewportRecord ssViewport, RCEnvironmentRecord ssEnvironment, RLCookieRecordList ssCookies, RCPaperRecord ssPaper, Boolean ssFromPublicService, Boolean forceNewBrowser, Int32 ssTimeoutSeconds, RequestLogger requestLogger) at OutSystems.NssUltimatePDF_Service.CssUltimatePDF_Service.MssPrintPDF(String ssURL, String ssHost, String ssTemporaryFolder, String ssProduct, String ssRevision, RCViewportRecord ssViewport, RCEnvironmentRecord ssEnvironment, RLCookieRecordList ssCookies, RCPaperRecord ssPaper, Boolean ssFromPublicService, Int32 ssTimeoutSeconds, Byte[]& ssPDF) at ssUltimatePDF_Service.RssExtensionUltimatePDF_Service.MssPrintPDFExt(HeContext heContext, String inParamURL, String inParamHost, String inParamTemporaryFolder, String inParamProduct, String inParamRevision, IRecord inParamViewport, IRecord inParamEnvironment, RecordList inParamCookies, IRecord inParamPaper, Boolean inParamFromPublicService, Int32 inParamTimeoutSeconds, Byte[]& outParamPDF)
2. An error occurred while generating the pdf for /XXXXXX/YYYYYYPDF?VarietyId=0&PDFName=AB_CCCC_939+From+HU.pdf&TemplateLink=https%3a%2f%2fabcd.sharepoint.com%2f%3ax%3a%2fr%2fsites%2fVIEW%2fShared%2520Document-S%22%7d%5d: Requested URL is not a PDF screen at ssUltimatePDF.Actions.ActionPrintPDF_Proxy(HeContext heContext, String inParamURL, String inParamTemporaryFolder, String inParamProduct, String inParamRevision, Boolean inParamAllowRevisionDownload, RCViewportRecord inParamViewport, STUserEnvironmentStructure inParamEnvironment, RCPaperRecord inParamPaper, Boolean inParamFromPublicService, Byte[]& outParamPDF) at ssUltimatePDF.Actions.ActionPrintToPDF_Internal(HeContext heContext, String inParamURL, STUserEnvironmentStructure inParamEnvironment, String inParamPaperSize, String inParamMarginSize, Boolean inParamFromPublicService, Byte[]& outParamPDF)
3. An error occurred while generating the pdf at ssUltimatePDF.Actions.ActionPrintToPDF_Internal(HeContext heContext, String inParamURL, STUserEnvironmentStructure inParamEnvironment, String inParamPaperSize, String inParamMarginSize, Boolean inParamFromPublicService, Byte[]& outParamPDF) at ssUltimatePDF.CsRESTExpose.Cspdf.CspdfControllerFlows.FlowpdfActionGetModuleScreen(HeContext heContext, String inParamModule, String inParamScreen, String inParamFilename, String inParamLocale, String inParamTimezone, Boolean inParamInline, Byte[]& outParamPDF) at ssUltimatePDF.CsRESTExpose.Cspdf.CspdfController.FlowpdfActionGetModuleScreen(String auxinParamModule, String auxinParamScreen, String auxinParamFilename, String auxinParamLocale, String auxinParamTimezone, Nullable`1 auxinParamInline)
Is the URL you are passing a public screen? What happens if you try to open the URL in your browser?
Unless you've obfuscated the URL, this:
/XXXXXX/YYYYYYPDF?VarietyId=0&PDFName=AB_CCCC_939+From+HU.pdf&TemplateLink=https%3a%2f%2fabcd.sharepoint.com%2f%3ax%3a%2fr%2fsites%2fVIEW%2fShared%2520Document-S%22%7d%5d
doesn't look right.
Yes, the URL is obfuscated. It give the same error when execute in the browser.
If you get the same error in the browser, there must be something wrong with the url, or the screen you're trying to get to. What error do you get when you paste the url into the browser?
Hi @Umesh Gupta
Confirm the target screen supports PDF rendering and is not blocked by authentication or other middleware that might prevent the Puppeteer browser from loading it correctly.
Inspect URL encoding: The error logs show URLs with encoded parameters, e.g., SharePoint links. Ensure URL parameters are correctly URL-encoded, and the Ultimate PDF module supports external or complex URLs in this version.
Ensure the URL used as input to the PDF generation function points to a published screen that is accessible and designed to be rendered as a PDF. It should not be a direct link to a document or an external site unless properly supported.