useblocks / sphinx-simplepdf

A simple PDF builder for Sphinx documentations
https://sphinx-simplepdf.readthedocs.io
MIT License
36 stars 15 forks source link

PDF name defaults to "Python" if Project metadata is removed #45

Closed sachin-suresh-rapyuta closed 8 months ago

sachin-suresh-rapyuta commented 1 year ago

In my conf.py, I have:

# -- Project information

project = 'PA-AMR Documentation'
author = 'Some name'

# The short X.Y version.
version = '1.3.0'

# The full version, including alpha/beta/rc tags.
release = version

With the above metadata, the PDF cover page has:

PA-AMR Documentation
Some name
Version 1.3.0

If I comment on the above lines:

  1. PDF generates with the file name Python.pdf
  2. PDF cover page is appended with:

    Python Version

Is this the right behavior that PDF picks data from the name, version, and author metadata? Can I customize this?

Maybe a dumb solution, but Is there a condition that I can use in conf.py something like:

if(if-builder:: simplepdf):
    ## Project information specific to simple-PDF
elif (if-builder:: html):
    ## Project information specific to HTML

Why I dont want project information to be picked into PDF?

I am completely using a custom cover page in the 'cover-bg' element of the simplepdf_vars. So I don't want anything to be displayed in the cover page.