Skip to content

[Bug] PDF producer's version information is missing on PDF that generated by docfx pdf command  #9843

@filzrev

Description

@filzrev

Describe the bug
PDF producer property is not written as expected.

To Reproduce

  1. Open PDF file generated by docfx.
  2. Confirm PDF document property.
  3. docfx () text is displayed as producer.

Expected behavior
PDF generator exe name with version information is displayed (e.g. 'docfx (2.76.0)`)

Additional context
Currently producer property is set on following line.

var producer = $"docfx ({typeof(PdfBuilder).Assembly.GetCustomAttribute<AssemblyVersionAttribute>()?.Version})";

But AssemblyVersionAttribute is missing on Docfx.App assembly.

It might be better to use name of Assembly.GetEntryAssembly().Name as producer name.
And use AssemblyFileVersionAttribute version instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pdfProduce PDF as the output format

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions