diff --git a/src/Docfx.App/PdfBuilder.cs b/src/Docfx.App/PdfBuilder.cs index 474f6fb5f96..6fe4478d27e 100644 --- a/src/Docfx.App/PdfBuilder.cs +++ b/src/Docfx.App/PdfBuilder.cs @@ -4,6 +4,7 @@ using System.Collections.Concurrent; using System.Diagnostics; using System.Reflection; +using System.Text; using System.Text.Json; using Docfx.Build; using Docfx.Common; @@ -137,7 +138,7 @@ await CreatePdf( IResult TocPage(string url) { var pageNumbers = pdfPageNumbers.TryGetValue(url, out var x) ? x : default; - return Results.Content(TocHtmlTemplate(new Uri(baseUrl!, url), pdfTocs[url], pageNumbers).ToString(), "text/html"); + return Results.Content(TocHtmlTemplate(new Uri(baseUrl!, url), pdfTocs[url], pageNumbers).ToString(), "text/html", Encoding.UTF8); } async Task PrintPdf(Outline outline, Uri url) diff --git a/src/docfx/Properties/launchSettings.json b/src/docfx/Properties/launchSettings.json index 24a63010eed..44553193297 100644 --- a/src/docfx/Properties/launchSettings.json +++ b/src/docfx/Properties/launchSettings.json @@ -40,6 +40,7 @@ "commandLineArgs": "pdf ../../samples/seed/docfx.json", "workingDirectory": ".", "environmentVariables": { + "DOCFX_PDF_TIMEOUT": "0" } }, // Run `docfx download` command. @@ -56,6 +57,7 @@ "commandLineArgs": "../../samples/seed/docfx.json", "workingDirectory": ".", "environmentVariables": { + "DOCFX_PDF_TIMEOUT": "0" } } }