Hi Barak Itkin,

My name is Elmar and the developer of the Indexprint plugin in Gimp (http://registry.gimp.org/node/24503) and at the moment I'm trying to implement your pdf plugin to extend the export capabilities of Indexprint.  But I have some problems using the pdb.pdf_save_multi procedure from Gimp. 

With the single page pdf procedure I have no problems (python language):

#==============================================================================
#================== save each indexprint as a pdf file ========================
#==============================================================================
def save_pdf(image, drawable, filename, raw_filename):
    vectorize, ignore_hidden, appl_masks = False, True, False
    pdb.file_pdf_save(image, drawable, filename, raw_filename,\
                       vectorize, ignore_hidden, appl_masks) 

##file-pdf-save
##parameters
##run-mode        INT32   run mode
##image           image   input image
##drawable        drawable    input drawable
##filename        string  the name of the file to save the image in
##raw-filename    string  the name of the file to save the image in
##vectorize       INT32   converts bitmap to vector graphics whre possible.
##                        TRUE or FALSE
##ignore-hidden   INT32   omit hidden layers and layers with zero opacity.
##                        TRUE or FALSE
##apply-masks     INT32   apply layer masks before saving. TRU or FALSe.
##                        (keeping them will not change the output)
###############################################################################


But the next procedure to save multi images in one large pdf file doesn't work.
I have searched the internet but found no documentation about it except for
the procedure database of Gimp.

#==============================================================================
#================== save all indexprints as one pdf file ======================
#==============================================================================
def save_pdf_multi(images, count, filename, raw_filename):
    vectorize, ignore_hidden, appl_masks = False, True, False
##    pdb.file_pdf_save_multi(images, count, filename, raw_filename,\
##                            vectorize, ignore_hidden, appl_masks ) #case 1
    pdb.file_pdf_save_multi(images, count, vectorize, ignore_hidden, appl_masks,\
                            filename, raw_filename ) #case 2
##file-pdf-save-multi
##parameters
##run-mode        INT32   run mode
##images          INT32ARRAY   input image for each page (an image can appear
##                            more than once)
##count           INT32   The amount of images entered (this will be the amount
##                          of pages). 1 <= count <= MAX_PAGE_COUNT
##vectorize       INT32   converts bitmap to vector graphics whre possible.
##                          TRUE or FALSE
##ignore-hidden   INT32   omit hidden layers and layers with zero opacity.
##                          TRUE or FALSE
##apply-masks     INT32   apply layer masks before saving. TRUE or FALSe.
##                          (keeping them will not change the output)
##filename        string  the name of the file to save the image in
##raw-filename    string  the name of the file to save the image in
##############################################################################

I call this function as follows. Sheetimg is the just created open indexprint; contact_full_filename is the name to save to. It is just for testing only 1 indexprint to save with pdf_multi

     ......
     countimages = 1
     imagearray = []
     imagearray.append(sheetimg)
     save_pdf_multi(imagearray, countimages, contact_full_filename,\
                                   contact_full_filename)
	 ......
								   
In the first case (looks more like pdf_safe) I get an error. 
----
File "C:\Documents and Settings\Elmar.WS03\.gimp-2.8\plug-ins\IndexprintDevelopment\GenerateIndexprint.py", line 101, in save_pdf_multi
    vectorize, ignore_hidden, appl_masks )
TypeError: subscript of wrong type
----

Oke changed the line to case 2. In the second case I get the following error:
----
File "C:\Documents and Settings\Elmar.WS03\.gimp-2.8\plug-ins\IndexprintDevelopment\GenerateIndexprint.py", line 103, in save_pdf_multi
    filename, raw_filename )
TypeError: subscript of wrong type
-----
Now I am puzzled. What am I doing wrong??

What I'm looking for is documentation and preferable an example how to use it.

Hope you can help me.
Regards,
Elmar
=================================================
Van GIT-hub: https://git.gnome.org/browse/gimp/tree/plug-ins/common/file-pdf-save.c

file-save-pdf
-------------
typedef enum
{
  SA_RUN_MODE,
  SA_IMAGE,
  SA_DRAWABLE,
  SA_FILENAME,
  SA_RAW_FILENAME,
  SA_VECTORIZE,
  SA_IGNORE_HIDDEN,
  SA_APPLY_MASKS,
  SA_ARG_COUNT
} SaveArgs;

file-save-pdf-multi
-------------------
typedef enum
{
  SMA_RUN_MODE,
  SMA_IMAGES,
  SMA_COUNT,
  SMA_VECTORIZE,
  SMA_IGNORE_HIDDEN,
  SMA_APPLY_MASKS,
  SMA_FILENAME,
  SMA_RAWFILENAME,
  SMA_ARG_COUNT
} SaveMultiArgs;
=====================================================