class IRegisterType1Face(interfaces.IRMLDirectiveSignature): """Register a new Type 1 font face.""" afmFile = attr.File( title=u'AFM File', description=u'Path to AFM file used to register the Type 1 face.', doNotOpen=True, required=True) pfbFile = attr.File( title=u'PFB File', description=u'Path to PFB file used to register the Type 1 face.', doNotOpen=True, required=True)
class ILogConfig(interfaces.IRMLDirectiveSignature): """Configure the render logger.""" level = attr.Choice( title=u'Level', description=u'The default log level.', choices=interfaces.LOG_LEVELS, doLower=False, required=False) format = attr.String( title=u'Format', description=u'The format of the log messages.', required=False) filename = attr.File( title=u'File Name', description=u'The path to the file that is being logged.', doNotOpen=True, required=True) filemode = attr.Choice( title=u'File Mode', description=u'The mode to open the file in.', choices={'WRITE': 'w', 'APPEND': 'a'}, default='a', required=False) datefmt = attr.String( title=u'Date Format', description=u'The format of the log message date.', required=False)
def __init__(self, fileName, ident=None): if isinstance(fileName, six.string_types): # Avoid circular imports. The filename resolutions hould be added # to a utility module. from z3c.rml import attr _srcAttr = attr.File(doNotOpen=True) fileName = _srcAttr.fromUnicode(fileName) return super(ImageReader, self).__init__(fileName, ident)
class IIncludePdfPages(interfaces.IRMLDirectiveSignature): """Inserts a set of pages from a given PDF.""" filename = attr.File(title=u'Path to file', description=u'The pdf file to include.', required=True) pages = attr.IntegerSequence(title=u'Pages', description=u'A list of pages to insert.', required=False)
class IMergePage(interfaces.IRMLDirectiveSignature): """Merges an existing PDF Page into the one to be generated.""" filename = attr.File( title=u'File', description=(u'Reference to the PDF file to extract the page from.'), required=True) page = attr.Integer( title=u'Page Number', description=u'The page number of the PDF file that is used to merge..', required=True)
class IRegisterTTFont(interfaces.IRMLDirectiveSignature): """Register a new TrueType font given the TT file and face name.""" faceName = attr.String( title=u'Face Name', description=(u'The name of the face the font uses. The face has to ' u'be previously registered.'), required=True) fileName = attr.File(title=u'File Name', description=u'File path of the of the TrueType font.', doNotOpen=True, required=True)