def __init__(self,
                 sub_type,
                 additional_entrys=None,
                 stream_filter_name="FlateDecode"):
        super(IndirectObject_Stream_XObject, self).__init__([
            pdfex.Entry_Constant("Type", pdfex.Name("XObject")),
            pdfex.Entry_Constant("Subtype", pdfex.Name(sub_type))
        ] + cact.default_list(additional_entrys), stream_filter_name)

        self.name = XOBJECT_NAME_GENERATOR.generate()
 def __init__(self, stream_filter_name="FlateDecode"):
     super(IndirectObject_Stream_XObject_SoftMask,
           self).__init__("Image", [
               pdfex.Entry_Function("Width", lambda: self.get_width()),
               pdfex.Entry_Function("Height", lambda: self.get_height()),
               pdfex.Entry_Constant("ColorSpace", pdfex.Name("DeviceGray")),
               pdfex.Entry_Function("BitsPerComponent",
                                    lambda: self.get_bits_per_component())
           ], stream_filter_name)
Ejemplo n.º 3
0
    def __init__(self, pages=None, parent=None):
        super(IndirectObject_PageTree, self).__init__([
            pdfex.Entry_Constant("Type", pdfex.Name("Pages")),
            pdfex.Entry_Value("pages", "Kids", []),
            pdfex.Entry_Value("parent", "Parent", parent),
            pdfex.Entry_Function("Count", lambda: len(self.pages))
        ])

        if pages:
            self.add_pages(pages)
Ejemplo n.º 4
0
	def __init__(self):
		super(IndirectObject_Resources, self).__init__([
			pdfex.Entry_Constant("ProcSet", [
				pdfex.Name("PDF"),
				pdfex.Name("Text"),
				pdfex.Name("ImageB"),
				pdfex.Name("ImageC"),
				pdfex.Name("ImageI")
			]),
			pdfex.Entry_Function("XObject", lambda: self.get_xobject_entrys())
		])
Ejemplo n.º 5
0
 def __init__(self, page_tree=None, open_action=None):
     super(IndirectObject_DocumentCatalog, self).__init__([
         pdfex.Entry_Constant("Type", pdfex.Name("Catalog")),
         pdfex.Entry_Value("page_tree", "Pages", page_tree),
         pdfex.Entry_Value("open_action", "OpenAction", open_action)
     ])