MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / convert

Method convert

docling/document_converter.py:186–203  ·  view source on GitHub ↗
(
        self,
        source: Union[Path, str, DocumentStream],  # TODO review naming
        headers: Optional[Dict[str, str]] = None,
        raises_on_error: bool = True,
        max_num_pages: int = sys.maxsize,
        max_file_size: int = sys.maxsize,
        page_range: PageRange = DEFAULT_PAGE_RANGE,
    )

Source from the content-addressed store, hash-verified

184
185 @validate_call(config=ConfigDict(strict=True))
186 def convert(
187 self,
188 source: Union[Path, str, DocumentStream], # TODO review naming
189 headers: Optional[Dict[str, str]] = None,
190 raises_on_error: bool = True,
191 max_num_pages: int = sys.maxsize,
192 max_file_size: int = sys.maxsize,
193 page_range: PageRange = DEFAULT_PAGE_RANGE,
194 ) -> ConversionResult:
195 all_res = self.convert_all(
196 source=[source],
197 raises_on_error=raises_on_error,
198 max_num_pages=max_num_pages,
199 max_file_size=max_file_size,
200 headers=headers,
201 page_range=page_range,
202 )
203 return next(all_res)
204
205 @validate_call(config=ConfigDict(strict=True))
206 def convert_all(

Callers 2

get_poster_textFunction · 0.95
gen_eval_markdownFunction · 0.95

Calls 1

convert_allMethod · 0.95

Tested by

no test coverage detected