Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update pdfpig nuget package version #9803

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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