[Gimp-user] Cannot use function file-pdf-save-multi
- From: renzofilini <forums gimpusers com>
- To: gimp-user-list gnome org
- Subject: [Gimp-user] Cannot use function file-pdf-save-multi
- Date: Mon, 28 Oct 2019 10:59:35 +0100
Attached file with correct formatting.
file-pdf-save-multi requires an array of image ids:
This is my python code:
#
# PDF file-pdf-save-multi python-fu example
# TESTED ON:
# GIMP 2.10.12 Python Console
# Python 2.7.16 (default, May 28 2019, 08:10:12) [GCC 8.3.0 64 bit
(AMD64)]
#
# Get image array
images = gimp.image_list()
#
# Optionally sort by filename to order pages by filename
# images.sort(key=lambda x: x.filename, reverse=False)
#
# Extract ids from image array
images_ids = [img.ID for img in images]
#
# Save multi page pdf
pdf_filename = "/tmp/multipage_output.pdf"
pdb.file_pdf_save_multi(len(images), images_ids, False, True, False,
pdf_filename, pdf_filename)
Attachments:
* https://www.gimpusers.com/system/attachments/1277/original/file-pdf-save-multi-example.py
--
renzofilini (via www.gimpusers.com/forums)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]