{"record":{"id":"d38b7fe3cece2c9e","repo":"QuestPDF/QuestPDF","slug":"the-previewer-application-is-no-longer-supprted-p","errorCode":null,"errorMessage":"The Previewer application is no longer supprted. Please use a new QuestPDF Companion application by calling ShowInCompanion() or ShowInCompanionAsync() methods.","messagePattern":"The Previewer application is no longer supprted\\. Please use a new QuestPDF Companion application by calling ShowInCompanion\\(\\) or ShowInCompanionAsync\\(\\) methods\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"warning","filePath":"src/dotnet/library/QuestPDF/Companion/Previewer.cs","lineNumber":20,"sourceCode":"using System.Diagnostics.CodeAnalysis;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing QuestPDF.Companion;\nusing QuestPDF.Drawing;\nusing QuestPDF.Infrastructure;\n\nnamespace QuestPDF.Previewer;\n\npublic static class PreviewerExtensions\n{\n    private const string ObsoleteMessage = \"The Previewer application is no longer supprted. Please use a new QuestPDF Companion application by calling ShowInCompanion() or ShowInCompanionAsync() methods.\";\n    \n    [Obsolete(ObsoleteMessage)]\n    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]\n    [ExcludeFromCodeCoverage]\n    public static void ShowInPreviewer(this IDocument document, int port = 12500)\n    {\n        throw new NotSupportedException(ObsoleteMessage);\n    }\n\n    [Obsolete(ObsoleteMessage)]\n    [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]\n    [ExcludeFromCodeCoverage]\n    public static Task ShowInPreviewerAsync(this IDocument document, int port = 12500, CancellationToken cancellationToken = default)\n    {\n        throw new NotSupportedException(ObsoleteMessage);\n    }\n}","sourceCodeStart":2,"sourceCodeEnd":30,"githubUrl":"https://github.com/QuestPDF/QuestPDF/blob/43ab12559671556e10a6a0a5afe542c919f48a21/src/dotnet/library/QuestPDF/Companion/Previewer.cs#L2-L30","documentation":"The legacy ShowInPreviewer synchronous extension is marked [Obsolete] and unconditionally throws NotSupportedException with the deprecation message. The old Previewer app was replaced by the QuestPDF Companion; this stub exists only to surface a clear migration error at runtime.","triggerScenarios":"Calling document.ShowInPreviewer() on any current QuestPDF version. The method body only throws - it performs no work.","commonSituations":"Carrying forward code from an older QuestPDF version that used the Previewer; following an outdated tutorial/sample that calls ShowInPreviewer.","solutions":["Replace ShowInPreviewer() with ShowInCompanion() (or the async variant) and run on .NET 8+.","Remove all references to the QuestPDF.Previewer namespace / ShowInPreviewer usings.","Update docs/tutorials to the Companion API."],"exampleFix":"// before:\ndoc.ShowInPreviewer();\n\n// after:\ndoc.ShowInCompanion();","handlingStrategy":"validation","validationCode":"// Simply do not call ShowInPreviewer; use the Companion API.\ndocument.ShowInCompanion();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remove all ShowInPreviewer usings/calls.","Use ShowInCompanion on .NET 8+."],"tags":["deprecation","previewer","companion"],"backgroundTag":null,"analyzedSha":"43ab12559671556e10a6a0a5afe542c919f48a21","analyzedAt":"2026-08-13T17:02:41.303Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}