mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 13:40:54 +03:00
Set PDF title to filename by default
This commit is contained in:
parent
1e56ed8c00
commit
f5740dc305
|
@ -22,6 +22,7 @@
|
|||
|
||||
from . import Image, ImageFile, ImageSequence, PdfParser
|
||||
import io
|
||||
import os
|
||||
|
||||
__version__ = "0.5"
|
||||
|
||||
|
@ -47,7 +48,7 @@ def _save_all(im, fp, filename):
|
|||
def _save(im, fp, filename, save_all=False):
|
||||
resolution = im.encoderinfo.get("resolution", 72.0)
|
||||
is_appending = im.encoderinfo.get("append", False)
|
||||
title = im.encoderinfo.get("title", None)
|
||||
title = None if is_appending else im.encoderinfo.get("title", os.path.splitext(filename)[0])
|
||||
author = im.encoderinfo.get("author", None)
|
||||
subject = im.encoderinfo.get("subject", None)
|
||||
keywords = im.encoderinfo.get("keywords", None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user