MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / init_doc

Method init_doc

src/__init__.py:5293–5313  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5291 return False
5292
5293 def init_doc(self):
5294 if self.is_encrypted:
5295 raise ValueError("cannot initialize - document still encrypted")
5296 self._outline = self._loadOutline()
5297 self.metadata = dict(
5298 [
5299 (k,self._getMetadata(v)) for k,v in {
5300 'format':'format',
5301 'title':'info:Title',
5302 'author':'info:Author',
5303 'subject':'info:Subject',
5304 'keywords':'info:Keywords',
5305 'creator':'info:Creator',
5306 'producer':'info:Producer',
5307 'creationDate':'info:CreationDate',
5308 'modDate':'info:ModDate',
5309 'trapped':'info:Trapped'
5310 }.items()
5311 ]
5312 )
5313 self.metadata['encryption'] = None if self._getMetadata('encryption')=='None' else self._getMetadata('encryption')
5314
5315 def insert_file(self,
5316 infile,

Callers 10

__init__Method · 0.95
_delToCMethod · 0.95
authenticateMethod · 0.95
layoutMethod · 0.95
get_tocMethod · 0.80
set_metadataMethod · 0.80
set_tocMethod · 0.80
get_tocFunction · 0.80
set_metadataFunction · 0.80
set_tocFunction · 0.80

Calls 2

_loadOutlineMethod · 0.95
_getMetadataMethod · 0.95

Tested by

no test coverage detected