Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3 ia÷†ã*@s`ddlZddlZddlZddlZddlZddlZddlZddlZdd„Zdddddd d d d d ddddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-œ)Z d.d/„Z Gd0d1„d1e ƒZ d2d3„Z Gd4d5„d5ejd6d7d8gƒƒZGd9d:„d:eƒZGd;d<„d<ƒZGd=d>„d>ƒZGd?d@„d@eƒZGdAdB„dBejƒZGdCdD„dDƒZGdEdF„dFƒZdGdH„ZGdIdJ„dJƒZdS)KéNcCstj|jdƒS)NÚ utf_16_be)ÚcodecsÚ BOM_UTF16_BEÚencode)Ús©rú./tmp/tmp5hum_rxs/lib64/python/PIL/PdfParser.pyÚ encode_text sr úu˘uˇuˆuË™uË�uË›uËšuËœu•u†u‡u…u—u–uÆ’uâ�„u‹u›u−u‰u„u“uâ€�u‘u’u‚uâ„¢uï¬�ufluÅ�uÅ’uÅ uŸuŽuıuÅ‚uÅ“uÅ¡užu€))éééééééééé€é�é‚éƒé„é…é†é‡éˆé‰éŠé‹éŒé�éŽé�é�é‘é’é“é”é•é–é—é˜é™éšé›éœé�éžé cCsH|dttjƒ…tjkr0|ttjƒd…jdƒSdjdd„|DƒƒSdS)NrÚcss|]}tj|t|ƒƒVqdS)N)ÚPDFDocEncodingÚgetÚchr)Ú.0Zbyterrrú Bszdecode_text..)ÚlenrrÚdecodeÚjoin)ÚbrrrÚ decode_text>sr>c@seZdZdZdS)ÚPdfFormatErrorz\An error that probably indicates a syntactic or semantic error in the PDF file structureN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrr?Esr?cCs|s t|ƒ‚dS)N)r?)Z conditionZ error_messagerrrÚcheck_format_conditionLsrDc@s4eZdZdd„Zdd„Zdd„Zdd„Zd d „Zd S) ÚIndirectReferencecCsd|S)Nz%s %s Rr)ÚselfrrrÚ__str__TszIndirectReference.__str__cCs|jƒjdƒS)Nzus-ascii)rGr)rFrrrÚ __bytes__WszIndirectReference.__bytes__cCs$|j|jko"|j|jko"|j|jkS)N)Ú __class__Ú object_idÚ generation)rFÚotherrrrÚ__eq__Zs  zIndirectReference.__eq__cCs ||k S)Nr)rFrLrrrÚ__ne__aszIndirectReference.__ne__cCst|j|jfƒS)N)ÚhashrJrK)rFrrrÚ__hash__dszIndirectReference.__hash__N)r@rArBrGrHrMrNrPrrrrrEQs rEZIndirectReferenceTuplerJrKc@seZdZdd„ZdS)ÚIndirectObjectDefcCsd|S)Nz %s %s objr)rFrrrrGiszIndirectObjectDef.__str__N)r@rArBrGrrrrrQhsrQc@sLeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dS)Ú XrefTablecCs i|_i|_ddi|_d|_dS)NriF)Úexisting_entriesÚ new_entriesÚdeleted_entriesÚreading_finished)rFrrrÚ__init__ns zXrefTable.__init__cCs2|jr||j|<n ||j|<||jkr.|j|=dS)N)rVrTrSrU)rFÚkeyÚvaluerrrÚ __setitem__ts    zXrefTable.__setitem__c Cs*y |j|Stk r$|j|SXdS)N)rTÚKeyErrorrS)rFrXrrrÚ __getitem__|s zXrefTable.__getitem__cCs†||jkr0|j|dd}|j|=||j|<nR||jkrX|j|dd}||j|<n*||jkrn|j|}ntdt|ƒdƒ‚dS)Néz object ID z+ cannot be deleted because it doesn't exist)rTrUrSÚ IndexErrorÚstr)rFrXrKrrrÚ __delitem__‚s      zXrefTable.__delitem__cCs||jkp||jkS)N)rSrT)rFrXrrrÚ __contains__‘szXrefTable.__contains__cCs.tt|jjƒƒt|jjƒƒBt|jjƒƒBƒS)N)r:ÚsetrSÚkeysrTrU)rFrrrÚ__len__”szXrefTable.__len__cCs*t|jjƒƒt|jjƒƒt|jjƒƒBS)N)rbrSrcrUrT)rFrrrrc›szXrefTable.keysc CsXtt|jjƒƒt|jjƒƒBƒ}tt|jjƒƒƒ}|jƒ}|jdƒ�x |�rRd}xPt|ƒD]<\}}|dksx|d|kr~|}q\|d|…}||d…}Pq\W|}d}|jd|dt|ƒfƒx�|D]ˆ} | |jkrè|jd|j| ƒqÄ|j dƒ} t | | kd| ›d| ›�ƒy |d} Wnt k �r2d} YnX|jd| |j| fƒqÄWqHW|S) Nsxref r]s%d %d rs%010d %05d n z*expected the next deleted object ID to be z, instead found s%010d %05d f ) ÚsortedrbrTrcrUÚtellÚwriteÚ enumerater:ÚpoprDr^) rFÚfrcZ deleted_keysZ startxrefÚprevÚindexrXZcontiguous_keysrJZthis_deleted_object_idZnext_in_linked_listrrrrg s<          zXrefTable.writeN) r@rArBrWrZr\r`rardrcrgrrrrrRmsrRc@sdeZdZdd„Zdd„Zdd„Zdd„Zd d „Zed d „ƒZ e e d dƒƒdd„dDƒZ dd„Z dS)ÚPdfNamecCs6t|tƒr|j|_nt|tƒr&||_n |jdƒ|_dS)Nzus-ascii)Ú isinstancermÚnameÚbytesr)rFrorrrrWÉs    zPdfName.__init__cCs |jjdƒS)Nzus-ascii)ror;)rFrrrÚ name_as_strÑszPdfName.name_as_strcCs t|tƒr|j|jkp||jkS)N)rnrmro)rFrLrrrrMÔszPdfName.__eq__cCs t|jƒS)N)rOro)rFrrrrPÙszPdfName.__hash__cCsdt|jƒ›d�S)NzPdfName(ú))Úreprro)rFrrrÚ__repr__ÜszPdfName.__repr__cCs|tj|ƒƒS)N)Ú PdfParserÚinterpret_name)ÚclsÚdatarrrÚfrom_pdf_streamßszPdfName.from_pdf_streamé!écCsh|] }t|ƒ’qSr)Úord)r8Úcrrrú ãszPdfName.z #%/()<>[]{}cCsDtdƒ}x2|jD](}||jkr*|j|ƒq|jd|ƒqWt|ƒS)Nó/s#%02X)Ú bytearrayroÚ allowed_charsÚappendÚextendrp)rFÚresultr=rrrrHås    zPdfName.__bytes__N)r@rArBrWrqrMrPrtÚ classmethodryrbÚranger�rHrrrrrmÈs rmc@seZdZdd„ZdS)ÚPdfArraycCsddjdd„|DƒƒdS)Ns[ ó css|]}t|ƒVqdS)N)Úpdf_repr)r8Úxrrrr9ñsz%PdfArray.__bytes__..s ])r<)rFrrrrHðszPdfArray.__bytes__N)r@rArBrHrrrrr‡ïsr‡c@s$eZdZdd„Zdd„Zdd„ZdS)ÚPdfDictcCs,|dkrtjj|||ƒn|||jdƒ<dS)Nrxzus-ascii)Ú collectionsÚUserDictÚ __setattr__r)rFrXrYrrrrŽõszPdfDict.__setattr__cCs,y||jdƒ}Wn,tk r>}zt|ƒ|‚WYdd}~XnXt|tƒrRt|ƒ}|jdƒ�r(|jdƒrt|dd…}d}t|ƒdkrÀ|d}t |dd…ƒd }t|ƒd krÀ|t |d d …ƒ7}d dt|ƒd…}t j |dt|ƒd…|ƒ}|dk�r(|d 9}|d k�r|d9}t j t j|ƒ|ƒ}|S)Nzus-asciiZDatezD:éÚZéééé<ééz %Y%m%d%H%M%Sú+ú-r])r—r˜éÿÿÿÿ)rr[ÚAttributeErrorrnrpr>ÚendswithÚ startswithr:ÚintÚtimeÚstrptimeÚgmtimeÚcalendarÚtimegm)rFrXrYÚeZ relationshipÚoffsetÚformatrrrÚ __getattr__ûs.        zPdfDict.__getattr__cCsrtdƒ}xV|jƒD]J\}}|dkr$qt|ƒ}|jdƒ|jtt|ƒƒƒ|jdƒ|j|ƒqW|jdƒt|ƒS)Ns<<ó rˆs >>)r€Úitemsr‰rƒrprm)rFÚoutrXrYrrrrHs   zPdfDict.__bytes__N)r@rArBrŽr¦rHrrrrr‹ôsr‹c@seZdZdd„Zdd„ZdS)Ú PdfBinarycCs ||_dS)N)rx)rFrxrrrrW%szPdfBinary.__init__cCsddjdd„|jDƒƒS)Ns<%s>ócss|]}d|VqdS)s%02XNr)r8r=rrrr9)sz&PdfBinary.__bytes__..)r<rx)rFrrrrH(szPdfBinary.__bytes__N)r@rArBrWrHrrrrrª$srªc@seZdZdd„Zdd„ZdS)Ú PdfStreamcCs||_||_dS)N)Ú dictionaryÚbuf)rFr­r®rrrrW-szPdfStream.__init__cCs†y |jj}Wntk r"|jSX|dkrjy |jj}Wntk rT|jj}YnXtj|jt|ƒd�St dt |jjƒ›d�ƒ‚dS)Ns FlateDecode)Úbufsizezstream filter z unknown/unsupported) r­ÚFilterršr®ZDLÚLengthÚzlibÚ decompressr�ÚNotImplementedErrorrs)rFÚfilterZexpected_lengthrrrr;1s  zPdfStream.decodeN)r@rArBrWr;rrrrr¬,sr¬cCs|dkr dS|dkrdS|dkr$dSt|ttttfƒr>t|ƒSt|tƒrVt|ƒjdƒSt|t ƒrnt|ƒjdƒSt|t j ƒr”dt j d|ƒjdƒd St|t ƒrªtt|ƒƒSt|tƒrÀtt|ƒƒSt|tƒrÖtt|ƒƒSt|tƒ�r|jd d ƒ}|jd d ƒ}|jd dƒ}d |d St|ƒSdS)NTstrueFsfalsesnullzus-asciis(D:z %Y%m%d%H%M%SZó)ó\s\\ó(s\(s\))rnrmr‹r‡rªrpr�r_rÚfloatržÚ struct_timeÚstrftimeÚdictÚlistr‰r Úreplace)rŠrrrr‰Bs4              r‰c @sîeZdZdZdrdd„Zdd„Zd d „Zd d „Zd d„Zdd„Z dd„Z dd„Z dd„Z dd„Z dd„Zdsdd„Zdd„Zdd „Zd!d"„Zed#d$„ƒZd%d&„Zdtd'd(„Zd)Zd*Zd+Zd,Zed-Zed.Zd/Zd0ZeeeZe j!ed1ed2ed3ed4ed5ed6e j"ƒZ#e j!ed1ed7ed3ed4ed5ee j"ƒZ$d8d9„Z%d:d;„Z&e j!eƒZ'e j!ed<ed=ƒZ(e j!ed>ƒZ)e j!ed?eƒZ*e+d@dA„ƒZ,e j!dBƒZ-e+dudDdE„ƒZ.e j!edFed=ƒZ/e j!edGed=ƒZ0e j!edHed=ƒZ1e j!edIed=ƒZ2e j!edJed=ƒZ3e j!edKƒZ4e j!edLƒZ5e j!edMedNƒZ6e j!edOƒZ7e j!edPedPedQed=ƒZ8e j!edPedPedRed=ƒZ9e j!edSed=ƒZ:e j!dTedUedVƒZ;e j!edWƒZe j!d\ƒZ?d]d^d_d`dadbdcdddedfdTdTd=d=dgdge@d]ƒd^e@d_ƒd`e@daƒdbe@dcƒdde@deƒdfe@dTƒdTe@d=ƒd=e@dgƒdgiZAe+dhdi„ƒZBe j!edjeƒZCe j!ed4ed4eeƒZDe j!dkƒZEdldm„ZFdydndo„ZGdzdpdq„ZHdS){ruz|Based on https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf Supports PDF up to 1.4 NrÚrbcCs|r|rtdƒ‚||_||_||_||_d|_d|_|dk rZ|dkrZt||ƒ|_}d|_|dk r�|j|ƒ|_}d|_| r�t |dƒr�|j |_i|_ |r¤|j ƒnTd|_ |_tƒ|_d|_tƒ|_d|_i|_g|_g|_d|_d|_i|_tƒ|_d|j_|�r|jƒdS)Nz4specify buf or f or filename, but not both buf and fFTror)Ú RuntimeErrorÚfilenamer®rjÚ start_offsetÚshould_close_bufÚshould_close_fileÚopenÚget_buf_from_fileÚhasattrroÚcached_objectsÚ read_pdf_infoÚfile_size_totalÚfile_size_thisr‹ÚrootÚroot_refÚinfoÚinfo_refÚpage_tree_rootÚpagesÚ orig_pagesÚ pages_refÚlast_xref_section_offsetÚ trailer_dictrRÚ xref_tablerVÚseek_end)rFrÁrjr®rÂÚmoderrrrWgsD  zPdfParser.__init__cCs|S)Nr)rFrrrÚ __enter__ŒszPdfParser.__enter__cCs |jƒdS)NF)Úclose)rFÚexc_typeÚ exc_valueÚ tracebackrrrÚ__exit__�szPdfParser.__exit__cCs|jƒ|jƒdS)N)Ú close_bufr×)rFrrrÚ start_writing“szPdfParser.start_writingc Cs.y|jjƒWntk r"YnXd|_dS)N)r®rÚrš)rFrrrrß—s zPdfParser.close_bufcCs2|jr|jƒ|jdk r.|jr.|jjƒd|_dS)N)rÃrßrjrÄrÚ)rFrrrrÚžs  zPdfParser.closecCs|jjdtjƒdS)Nr)rjÚseekÚosÚSEEK_END)rFrrrr×¥szPdfParser.seek_endcCs|jjdƒdS)Ns %PDF-1.4 )rjrg)rFrrrÚ write_header¨szPdfParser.write_headercCs|jjd|›d�jdƒƒdS)Nz% Ú zutf-8)rjrgr)rFrrrrÚ write_comment«szPdfParser.write_commentcCsl|jƒ|j|jjƒƒ|_|jdƒ|_|jƒ|j|jtdƒ|jd�|j|jtdƒt |j ƒ|j d�|jS)NrsCatalog)ÚTypeZPagessPages)rçZCountZKids) Údel_rootÚnext_object_idrjrfrÍrÓÚ rewrite_pagesÚ write_objrmr:rÑ)rFrrrÚ write_catalog®s  zPdfParser.write_catalogc Csg}x®t|jƒD] \}}|j|}|j|j=|j|tdƒƒ||jkrJqi}x |jƒD]\}}|||j ƒ<qXW|j |d<|j d|Ž}x(t|jƒD]\} } | |kr’||j| <q’WqWxB|D]:} x4| rò|j| } | j|jkrä|j| j=| j ddƒ} qÀWqºWg|_dS)NsParentÚParent)N) rhrÒrÈrÖrJr‚rmrÑr¨rqrÓÚ write_pager6) rFZpages_tree_nodes_to_deleteÚiZpage_refZ page_infoZstringified_page_inforXrYZ new_page_refÚjZ cur_page_refZpages_tree_node_refZpages_tree_noderrrrê¼s,         zPdfParser.rewrite_pagescCsš|r|jƒ||_|jr(|jd|jƒ|_|jj|jƒ}t|jƒ}|j|dœ}|j dk r`|j |d<|jrp|j|d<||_ |jjdt t |ƒƒd|ƒdS)N)sRootsSizesPrevsInfostrailer s startxref %d %%%%EOF) rèrÍrÎrërÏrÖrgrjr:rÔrpr‹)rFZ new_root_refZ start_xrefZ num_entriesrÕrrrÚwrite_xref_and_trailerÙs     z PdfParser.write_xref_and_trailercOsLt|tƒr|j|}d|kr(tdƒ|d<d|kr:|j|d<|j|f|ž|ŽS)NrçsPagerí)rnr�rÑrmrÓrë)rFÚrefÚobjsÚdict_objrrrrîís    zPdfParser.write_pagecOsÈ|j}|dkr|j|jƒƒ}n|jƒ|jf|j|j<|jtt|Žƒƒ|j ddƒ}|dk rft |ƒ|d<|rx|jt |ƒƒx|D]}|jt |ƒƒq~W|dk rº|jdƒ|j|ƒ|jdƒ|jdƒ|S)NÚstreamr±sstream s endstream sendobj ) rjrérfrKrÖrJrgrprQrir:r‰)rFròrórôrjrõÚobjrrrrëös$       zPdfParser.write_objcCs.|jdkrdS|j|jj=|j|jdj=dS)NsPages)rÍrÖrJrÌ)rFrrrrè s  zPdfParser.del_rootc CsTt|dƒr|jƒSt|dƒr$|jƒSytj|jƒdtjd�Stk rNdSXdS)NÚ getbufferÚgetvaluer)Úaccessr«)rÇr÷røÚmmapÚfilenoZ ACCESS_READÚ ValueError)rjrrrrÆs  zPdfParser.get_buf_from_filecCsüt|jƒ|_|j|j|_|jƒ|jd|_|jjddƒ|_ t |j |jƒƒ|_ |j dkrdt ƒ|_ nt |j |j ƒƒ|_ td|j kdƒt|j ddkdƒtd|j kdƒtt|j dtƒd ƒ|j d|_|j |jƒ|_|j|jƒ|_|jdd…|_dS) NsRootsInfosTypez/Type missing in RootsCatalogz/Type in Root is not /CatalogsPagesz/Pages missing in Rootz+/Pages in Root is not an indirect reference)r:r®rÊrÂrËÚ read_trailerrÕrÍr6rÏr‹Ú read_indirectrÌrÎrDrnrErÓrÐÚlinearize_page_treerÑrÒ)rFrrrrÉs(     zPdfParser.read_pdf_infoc CsXytt|jjƒƒddƒ}Wntk r:tddƒ}YnX|dk rT|df|j|j<|S)Nr]r)rEÚmaxrÖrcrürJ)rFr¤Ú referencerrrré9szPdfParser.next_object_ids [][()<>{}/%]s$[][()<>{}/%\000\011\012\014\015\040]s[\000\011\012\014\015\040]s#[\000\011\012\014\015\0400-9a-fA-F]ó*ó+s[\000\011\014\015\040]*s[\r\n]+strailers \<\<(.*\>\>)s startxrefs([0-9]+)s%%EOFó$s \<\<(.*?\>\>)cCsÄt|jƒd}||jkr|j}|jj|j|ƒ}t|dƒ|}x$|r`|}|jj|j|jƒdƒ}q>W|sj|}|jdƒ}t|jdƒƒ|_ |j |ƒ|_ t ƒ|_ |j|j d�d|j krÀ|j|j dƒdS)Ni@ztrailer end not foundér]r�)Úxref_section_offsetsPrev)r:r®rÂÚre_trailer_endÚsearchrDÚstartÚgroupr�rÔÚinterpret_trailerrÕrRrÖÚread_xref_tableÚread_prev_trailer)rFZsearch_start_offsetÚmZ last_matchÚ trailer_datarrrrýjs$     zPdfParser.read_trailercCsv|j|d�}|jj|j||d…ƒ}t|dƒ|jdƒ}tt|jdƒƒ|kdƒ|j|ƒ}d|krr|j|dƒdS)N)ri@zprevious trailer not foundr]r�zGxref section offset in previous trailer doesn't match what was expectedsPrev) r Úre_trailer_prevrr®rDr r�r r )rFrZtrailer_offsetrrrÕrrrr s    zPdfParser.read_prev_trailers/([!-$&'*-.0-;=?-Z\\^-z|~]+)(?=r¶s\<\\>cCsÂi}d}x||jj||ƒ}|sV|jj||ƒ}t|o>|jƒt|ƒkdt||d…ƒƒP|j|jdƒƒ}|j ||jƒƒ\}}|||<q Wtd|koœt |dt ƒdƒtd|ko¸t |dt ƒdƒ|S)Nrz+name not found in trailer, remaining data: r]sSizez&/Size not in trailer or not an integersRootz1/Root not in trailer or not an indirect reference) Úre_nameÚmatchÚ re_dict_endrDÚendr:rsrvr Ú get_valuernr�rE)rwrÚtrailerr¤rrXrYrrrr ˜s* zPdfParser.interpret_trailers([^#]*)(#([0-9a-fA-F]{2}))?FcCsrd}xR|jj|ƒD]B}|jdƒrF||jdƒtj|jdƒjdƒƒ7}q||jdƒ7}qW|rf|jdƒSt|ƒSdS)Nr«ér]zus-asciizutf-8)Úre_hashes_in_nameÚfinditerr r€Úfromhexr;rp)rwÚrawZas_textrorrrrrvµs & zPdfParser.interpret_namesnull(?=strue(?=sfalse(?=s([-+]?[0-9]+)(?=s)([-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+))(?=s\[ó]s\<(s*)\>s\(s ([-+]?[0-9]+)sR(?=sobj(?=s endobj(?=r¸s %[^\r\n]*s)*s stream\r?\ns endstream(?=r]cCsè|dkr dS|jj||ƒ}|r&|jƒ}|jj||ƒ}|rètt|jdƒƒdkdƒtt|jdƒƒdkdƒt|dkp’|tt|jdƒƒt|jdƒƒƒkdƒ|j||jƒ|dd�\}}|dkrÄ|dfS|j j||ƒ}t|dƒ||jƒfSt| d ƒ|j j||ƒ}|�r^tt|jdƒƒdkd ƒtt|jdƒƒdkd ƒtt|jdƒƒt|jdƒƒƒ|jƒfS|j j||ƒ}|�rÒ|jƒ}i}|j j||ƒ}xv|�s|j|||dd�\}}|dk�r¾|dfS|j|||dd�\} }| ||<|dk�rð|dfS|j j||ƒ}�qŽW|jƒ}|j j||ƒ}|�rÂyt|d ƒ} Wn@tttfk �rp} ztd |jd dƒƒ| ‚WYdd} ~ XnX||jƒ|jƒ| …} |jj||jƒ| ƒ}t|dƒ|jƒ}tt|ƒ| ƒ}nt|ƒ}||fS|jj||ƒ}|�r\|jƒ}g}|jj||ƒ}xN|�sN|j|||dd�\} }|j| ƒ|dk�r<|dfS|jj||ƒ}�qW||jƒfS|jj||ƒ}|�r|d|jƒfS|jj||ƒ}|�rœd|jƒfS|jj||ƒ}|�r¼d|jƒfS|jj||ƒ}|�rìt|j|jdƒƒƒ|jƒfS|jj||ƒ}|�rt|jdƒƒ|jƒfS|j j||ƒ}|�r@t!|jdƒƒ|jƒfS|j"j||ƒ}|�r¤t#dd„|jdƒDƒƒ} t$| ƒddk�rŒ| jt%dƒƒt#j&| j'dƒƒ|jƒfS|j(j||ƒ}|�rÈ|j)||jƒƒStdt*|||d…ƒƒ‚dS)Nrr]zasz'PdfParser.get_value..ó0zus-asciizunrecognized object: é )NN)+Ú re_commentrrÚre_indirect_def_startrDr�r rErÚre_indirect_def_endÚre_indirect_referenceÚ re_dict_startrÚre_stream_startÚ TypeErrorr[rür?r6Ú re_stream_endr¬r‹Úre_array_startÚ re_array_endr‚Úre_nullÚre_trueÚre_falserrmrvÚre_intÚre_realr¹Ú re_string_hexr€r:r|rr;Ú re_string_litÚget_literal_stringrs)rwrxr¤Úexpect_indirectrrÚobjectr„rXrYZ stream_lenr£Z stream_dataZ hex_stringrrrrósÖ   &         zPdfParser.get_valuesF(\\[nrtbf()\\])|(\\[0-9]{1,3})|(\\(\r\n|\r|\n))|(\r\n|\r|\n)|(\()|(\))ónr§óró ótó óbóófó r·cCsd}tƒ}xø|jj||ƒD]æ}|j|||jƒ…ƒ|jdƒrZ|j|j|jdƒdƒnž|jdƒr„|jt|jdƒdd…dƒƒnt|jdƒr�nh|jdƒr¦|jdƒnR|jdƒrÄ|jd ƒ|d7}n4|jd ƒrø|dkræt |ƒ|j ƒfS|jd ƒ|d8}|j ƒ}qWt d ƒ‚dS) Nrr]r�érér§ér¸ér¶zunfinished literal string) r€Úre_lit_str_tokenrrƒr r Ú escaped_charsr‚r�rprr?)rwrxr¤Z nesting_depthr„rrrrr2ƒs,            zPdfParser.get_literal_stringsxrefs+([0-9]{10}) ([0-9]{5}) ([fn])( \r| \n|\r\n)c Csd}|jj|j||jƒ}t|dƒ|jƒ}xà|jj|j|ƒ}|sNt|dƒPd}|jƒ}t|jdƒƒ}t|jdƒƒ}x’t |||ƒD]€}|j j|j|ƒ}t|dƒ|jƒ}|jdƒd k}t|jdƒƒ} |s†t|jdƒƒ| f} t||j kpö|j || kd ƒ| |j |<q†Wq.W|S) NFzxref section start not foundzxref subsection start not foundTr]r�zxref entry not foundrr<z)xref entry duplicated (and not identical)) Úre_xref_section_startrr®rÂrDrÚre_xref_subsection_startr�r r†Ú re_xref_entryrÖ) rFrZsubsection_foundrr¤Z first_objectÚ num_objectsrïZis_freerKZ new_entryrrrr §s8  zPdfParser.read_xref_tablec Cst|j|d\}}t||dkd|d›d|d›d|›d|›�ƒ|j|j||jt|Ž|d�d}||j|<|S)Nrr]zexpected to find generation z for object ID z) in xref table, instead found generation z at offset )r3r)rÖrDrr®rÂrErÈ)rFròrr¤rKrYrrrrþÈs & zPdfParser.read_indirectcCsn|dkr|j}t|ddkdƒg}xD|dD]8}|j|ƒ}|ddkrT|j|ƒq.|j|j|d�ƒq.W|S)NsTypesPagesz%/Type of page tree node is not /PagessKidssPage)Únode)rÐrDrþr‚rƒrÿ)rFrHrÑÚkidZ kid_objectrrrrÿØs   zPdfParser.linearize_page_tree)NNNrr¿)N)N)Fr™)Nr™r™)r™)N)Ir@rArBrCrWrÙrÞràrßrÚr×rärærìrêrñrîrërèÚ staticmethodrÆrÉréÚ delimiterZdelimiter_or_wsÚ whitespaceZwhitespace_or_hexZwhitespace_optionalZwhitespace_mandatoryZwhitespace_optional_no_nlZ newline_onlyÚnewlineÚreÚcompileÚDOTALLrrrýr Zre_whitespace_optionalrr%rr…r rrvr+r,r-r.r/r)r*r0r1r$r"r#r!r&r(rrBr|rCr2rDrErFr rþrÿrrrrruasÀ %      . *    "" y   ! ru)r¡rrŒrúrârNržr²r r5r>rÀr?rDÚ namedtuplerErQrRrmr½r‡r�r‹rªr¬r‰rurrrrÚs~ ['0