Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 îb³ã@sNdZddlmZmZmZddlmZdd„ZGdd„deƒZGdd „d ƒZ d S) zHhelper for importing pdf structures into a ReportLab generated document é)ÚformatÚ PDFObjectÚ pdfdocEnc)ÚstrTypescCsztttƒrtntf}|ttf}xT|D]L}t||ƒs&t|ƒdkrPtdt|ƒƒ‚t|dtƒs&tdt|dƒƒ‚q&WdS)NézTsequence elts must be strings/bytes/PDFPatternIfs or singletons containing strings: rzCSingletons must contain strings/bytes or PDFObject instances only: )Ú isinstancerÚtuplerÚ PDFPatternIfÚlenÚ ValueErrorÚascii)Úpattern_sequenceZ allowedTypesÚx©rú=/tmp/tmp4i9tl1d3/lib64/python/reportlab/pdfbase/pdfpattern.pyÚ_patternSequenceChecks    rc@s@eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dS)Ú PDFPatternrcKst|ƒ||_||_dS)a Description of a kind of PDF object using a pattern. Pattern sequence should contain strings, singletons of form [string] or PDFPatternIf objects. Strings are literal strings to be used in the object. Singletons are names of keyword arguments to include. PDFpatternIf objects allow some conditionality. Keyword arguments can be non-instances which are substituted directly in string conversion, or they can be object instances in which case they should be pdfdoc.* style objects with a x.format(doc) method. Keyword arguments may be set on initialization or subsequently using __setitem__, before format. "constant object" instances can also be inserted in the patterns. N)rÚpatternÚ arguments)Úselfr Z keywordargsrrrÚ__init__szPDFPattern.__init__cCs||j|<dS)N)r)rÚitemÚvaluerrrÚ __setitem__%szPDFPattern.__setitem__cCs |j|S)N)r)rrrrrÚ __getitem__(szPDFPattern.__getitem__c cs|j}|j}xð|D]è}t|tƒr,t|ƒVqt|tƒrD|j|ƒVqt|tƒr’t|j |j ƒƒ}|oh|d}xŽ|j |rz|j n|j ƒD] }|Vq‚Wq|d}|j |dƒ} | dkr¾tdt|ƒƒ‚t| tƒrÖt| |ƒVqt| tƒrìt| ƒVqtt| ƒƒVqWdS)Nrz%s value not defined)rÚ_PDFPattern__documentrrrrrr ÚlistÚevalÚcondÚthenPartÚelsePartÚgetr r Ústr) rÚLrÚdocumentrÚresultrÚzÚnamerrrrr+s*           zPDFPattern.evalc Cs$||_zdj|j|jƒƒS|`XdS)Nó)rÚjoinrr)rr$rrrrDszPDFPattern.formatcCs tj|jƒ}|j|_|j|_|S)N)ÚobjectÚ__new__Ú __class__rr)rÚcrrrÚcloneKs zPDFPattern.cloneN) Ú__name__Ú __module__Ú __qualname__Z __RefOnly__rrrrrr.rrrrrsrc@seZdZdZggfdd„ZdS)r zÙcond will be evaluated as [cond] in PDFpattern eval. It should evaluate to a list with value 0/1 etc etc. thenPart is a list to be evaluated if the cond evaulates true, elsePart is the false sequence. cCsBt|tƒs|g}x|||fD] }t|ƒqW||_||_||_dS)N)rrrrrr )rrrr rrrrrWs  zPDFPatternIf.__init__N)r/r0r1Ú__doc__rrrrrr Qsr N) r2Zreportlab.pdfbase.pdfdocrrrZreportlab.lib.utilsrrrr rrrrÚs   A