Converting Presentation file to PDF leads to inconsistent headers/footers

Headers, footers, page numbers and more.zip (49.0 KB)

When using GroupDocs.Conversion v26.1.0, when we attempt to convert the above file, we have noticed that the headers and footers that are present for each page normally when viewing the file are not appearing on each page after conversion.

We are using the following code to reproduce this

	[Test]
	public async Task Converting_PresentationWithHeadersAndFooters_ShouldHaveHeaderFootersOnAllPages()
	{
		// Arrange
		var filename = "Headers, footers, page numbers and more.pptx";
		var path = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "Presentation", filename);
		await using var originalDocument = File.Open(path, FileMode.Open);

		// Act
		using var converter = new Converter(
			() => originalDocument,
			context =>
			{
				var loadOptions = new PresentationLoadOptions
				{
					ShowHiddenSlides = true,
					SkipExternalResources = true,
					ClearBuiltInDocumentProperties = true,
					ClearCustomDocumentProperties = true,
					NotesPosition = PresentationNotesPosition.BottomFull,
				};

				return loadOptions;
			});

		using var outputStream = new MemoryStream();
		var options = new PdfConvertOptions { PdfOptions = new PdfOptions { Linearize = true }, };
		converter.Convert(
			options,
			(ConvertedContext convertedContext) =>
			{
				convertedContext.ConvertedStream.Position = 0;
				convertedContext.ConvertedStream.CopyTo(outputStream);
			});

		// Copy file to temp directory to examine
		var outFilePath = Path.Combine(
			Path.GetTempPath(),
			$"{Guid.NewGuid()}-{filename}.pdf");
		await using var outFile = new FileStream(outFilePath, FileMode.CreateNew);
		outputStream.Position = 0;
		await outputStream.CopyToAsync(outFile);
	}

@tonyMilyli

Thanks for the report, and for the sample. We reproduced it.

With NotesPosition = BottomFull, the notes-and-handouts header and footer only come out on page 1. Only slide 1 has its own notes page stored in the PPTX. Slides 2 to 4 have to inherit theirs from the notes master, and that isn’t happening on render. The slide number comes from the same master and does come through, which is why the output looks inconsistent rather than just empty.

We’ve logged it under CONVERSIONNET-8396. We don’t have a workaround through the current API. We’ll post an update here once we have one.

1 Like

Wanted to add that we are having similar issues with ODP and PPT file types as well, but they don’t appear to have the headers and footers carrying over at all.

Headers, footers, page numbers and more_others.zip (127.2 KB)