"""

        This module is based on third-party library called "fdfgen".

        Source:          https://github.com/ccnmtl/fdfgen
 ***************************************************************************/
"""

from fdfgen import forge_fdf

class FDFModule(object):

    def __init__(self):
        self.fdf_file = 'data.fdf'

    def make_fdf_file(self, fields):
        """Makes fdf file based on pdf template.

        :param fields: list of tuples with pdf field names and given data
        :returns: fdf file with pdf forms
        """

        fdf = forge_fdf("",fields,[],[],[])
        fdf_file = open(self.fdf_file,"w")
        fdf_file.write(fdf)
        fdf_file.close()