Skip to content

Commit

Permalink
chore: update pdfpig nuget package version (#9803)
Browse files Browse the repository at this point in the history
  • Loading branch information
filzrev authored Mar 21, 2024
1 parent c3e8352 commit bd015c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="OneOf" Version="3.0.263" />
<PackageVersion Include="OneOf.SourceGenerator" Version="3.0.263" />
<PackageVersion Include="PdfPig" Version="0.1.9-alpha-20240312-845e3" />
<PackageVersion Include="PdfPig" Version="0.1.9-alpha-20240318-69e2b" />
<PackageVersion Include="PlantUml.Net" Version="1.4.80" />
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
<PackageVersion Include="Spectre.Console.Cli" Version="0.48.0" />
Expand Down
5 changes: 4 additions & 1 deletion src/Docfx.App/PdfBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ await Parallel.ForEachAsync(pages, async (item, _) =>
if (outline.pdfTocPage)
{
var href = $"/_pdftoc{outlineUrl.AbsolutePath}";
yield return (new(outlineUrl, href), new() { href = href, pdfPrintBackground = outline.pdfPrintBackground });
yield return (new(outlineUrl, href), new() { href = href, pdfPrintBackground = outline.pdfPrintBackground });
}

if (!string.IsNullOrEmpty(outline.href))
Expand Down Expand Up @@ -325,6 +325,9 @@ async Task MergePdf()
// Refresh TOC page numbers
updatePageNumbers(pageNumbers);
bytes = await printPdf(outline, url);

if (bytes == null)
continue;
}

using var document = PdfDocument.Open(bytes);
Expand Down

0 comments on commit bd015c5

Please sign in to comment.