Skip to content

Commit

Permalink
fix: remove PDF missing TOC warning (#9610)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufeih authored Jan 13, 2024
1 parent 2d40897 commit 6f8e2ce
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Docfx.App/PdfBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,17 @@ public static Task Run(BuildJsonConfig config, string configDirectory, string? o
var outputFolder = Path.GetFullPath(Path.Combine(
string.IsNullOrEmpty(outputDirectory) ? Path.Combine(configDirectory, config.Output ?? "") : outputDirectory,
config.Dest ?? ""));

Logger.LogInfo($"Searching for manifest in {outputFolder}");
return CreatePdf(outputFolder);
}

public static async Task CreatePdf(string outputFolder)
{
var stopwatch = Stopwatch.StartNew();
Logger.LogInfo($"Searching for manifest in {outputFolder}");
var pdfTocs = GetPdfTocs().ToDictionary(p => p.url, p => p.toc);
if (pdfTocs.Count == 0)
{
Logger.LogWarning($"No PDF TOC's found in: {outputFolder}");
return;
}

Program.Main(new[] { "install", "chromium" });

Expand Down

0 comments on commit 6f8e2ce

Please sign in to comment.