You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi, I have strange problem with generating PDF when TOC.md contains some links with bookmarks. It works locally on my laptop but when I'm doing the same on Windows Server PDF generation fails.
PDF generation turned off - no error.
In generated TOC.html links are working.
I've tried TOC.yml instead TOC.md - the same error.
Locally on Windows 11 works, but on Windows server - it fails.
(...)
XRef map exported.
Extracting index datafrom4 html files
Content\doc-pdf.pdf: 0%
InvalidOperationException: Failed to build PDF page []:
http://127.0.0.1:58412/Content/article1.html#header3-5
at void MoveNext() in PdfBuilder.cs:156
at void MoveNext() in PdfBuilder.cs:238
at void MoveNext()
at async Task CreatePdf(Func<Outline, Uri, Task<byte[]>> printPdf,
Func<Outline, int, int, Task<byte[]>> printHeaderFooter, ProgressTask task,
Uri outlineUrl, Outline outline, string outputPath,
Action<Dictionary<Outline, int>> updatePageNumbers) in PdfBuilder.cs:235
at void MoveNext() in PdfBuilder.cs:105
at void MoveNext()
at void MoveNext() in PdfBuilder.cs:98
at void MoveNext() in Progress.cs:103
at void MoveNext() in Progress.cs:138
at async Task<T> RunAsync<T>(Func<Task<T>> func) in DefaultExclusivityMode.cs:
40
at async Task<T> StartAsync<T>(Func<ProgressContext, Task<T>> action) in
Progress.cs:121
at async Task StartAsync(Func<ProgressContext, Task> action) in Progress.cs:
101
at async Task CreatePdf(string outputFolder) in PdfBuilder.cs:96
at async Task CreatePdf(string outputFolder) in PdfBuilder.cs:114
at async Task CreatePdf(string outputFolder) in PdfBuilder.cs:114
at void <Execute>b__0() in DefaultCommand.cs:53
at int Run(LogOptions options, Action run) in CommandHelper.cs:48
at int Execute(CommandContext context, Options options) in DefaultCommand.cs:
31
at Task<int> Execute(CommandContext context, CommandSettings settings) in
CommandOfT.cs:40
at Task<int> Execute(CommandTree leaf, CommandTree tree, CommandContext
context, ITypeResolver resolver, IConfiguration configuration) in
CommandExecutor.cs:144
at async Task<int> Execute(IConfiguration configuration, IEnumerable<string>
args) in CommandExecutor.cs:83
Expected behavior
PDF should be generated without any errors/warnings.
Context (please complete the following information):
OS: Windows Server 2019, 2022
Docfx version: 2.76.0
Additional context
I noticed - when I remove last line in TOC.md - this one:
### [header3-5](article1.md#header3-5)
Everythings works and there is no error:
XRef map exported.
Extracting index datafrom4 html files
Content\doc-pdf.pdf: 0%
Content\doc-pdf.pdf: 53%
Content\doc-pdf.pdf: 99%
Build succeeded.
0 warning(s)
0 error(s)
Adding any next link with bookmark causes error but adding link without bookmark works. So it looks like there is some problem above 6 links with bookmarks or maybe there is limitation I don't know. Could someone check this issue or tell me how to resolve/workaround that?
The text was updated successfully, but these errors were encountered:
iti-pawel-wach
changed the title
[Bug] PDF generation fails when TOC has many bookmarks - Azure DevOps pipeline
[Bug] PDF generation fails when TOC has many bookmarks
May 15, 2024
The method either throws an error or returns a main resource response. The only exceptions are navigation to about:blank or navigation to the same URL with a different hash, which would succeed and return null.
Describe the bug
Hi, I have strange problem with generating PDF when TOC.md contains some links with bookmarks. It works locally on my laptop but when I'm doing the same on Windows Server PDF generation fails.
PDF generation turned off - no error.
In generated TOC.html links are working.
I've tried TOC.yml instead TOC.md - the same error.
Locally on Windows 11 works, but on Windows server - it fails.
To Reproduce
Steps to reproduce the behavior:
docfx.json:
Full log: log.txt
Expected behavior
PDF should be generated without any errors/warnings.
Context (please complete the following information):
Additional context
I noticed - when I remove last line in TOC.md - this one:
Everythings works and there is no error:
Adding any next link with bookmark causes error but adding link without bookmark works. So it looks like there is some problem above 6 links with bookmarks or maybe there is limitation I don't know. Could someone check this issue or tell me how to resolve/workaround that?
The text was updated successfully, but these errors were encountered: