示例#1
0
    def __init__(self, title, page, typ, *args):
        DictionaryObject.__init__(self)
        self[NameObject("/Title")] = title
        self[NameObject("/Page")] = page
        self[NameObject("/Type")] = typ

        # from table 8.2 of the PDF 1.6 reference.
        if typ == "/XYZ":
            (self[NameObject("/Left")], self[NameObject("/Top")],
                self[NameObject("/Zoom")]) = args
        elif typ == "/FitR":
            (self[NameObject("/Left")], self[NameObject("/Bottom")],
                self[NameObject("/Right")], self[NameObject("/Top")]) = args
        elif typ in ["/FitH", "FitBH"]:
            self[NameObject("/Top")], = args
        elif typ in ["/FitV", "FitBV"]:
            self[NameObject("/Left")], = args
        elif typ in ["/Fit", "FitB"]:
            pass
        else:
            raise utils.PdfReadError("Unknown Destination Type: %r" % typ)
示例#2
0
 def __init__(self, pdf=None, indirectRef=None):
     DictionaryObject.__init__(self)
     self.pdf = pdf
     # Stores the original indirect reference
     # to this object in its source PDF
     self.indirectRef = indirectRef
示例#3
0
 def __init__(self, pdf=None, indirectRef=None):
     DictionaryObject.__init__(self)
     self.pdf = pdf
     # Stores the original indirect reference
     # to this object in its source PDF
     self.indirectRef = indirectRef
示例#4
0
 def __init__(self):
     DictionaryObject.__init__(self)