How to compute page content (tuning, not selection). Fixed when the document is opened; the C++ page-decoder cache freezes these at first decode, so they cannot vary per page. Entity selection lives on ContentConfig instead.
| 243 | |
| 244 | |
| 245 | class DecodeConfig(BaseModel): |
| 246 | """How to compute page content (tuning, not selection). |
| 247 | |
| 248 | Fixed when the document is opened; the C++ page-decoder cache freezes these |
| 249 | at first decode, so they cannot vary per page. Entity selection lives on |
| 250 | ContentConfig instead. |
| 251 | """ |
| 252 | |
| 253 | model_config = ConfigDict(validate_assignment=True) |
| 254 | |
| 255 | do_sanitization: bool = True |
| 256 | enforce_same_font: bool = True |
| 257 | horizontal_cell_tolerance: float = 1.0 |
| 258 | word_space_width_factor_for_merge: float = 0.33 |
| 259 | line_space_width_factor_for_merge: float = 1.0 |
| 260 | line_space_width_factor_for_merge_with_space: float = 0.33 |
| 261 | max_num_lines: int = -1 |
| 262 | max_num_bitmaps: int = -1 |
| 263 | min_visible_clip_extent: float = 1e-3 |
| 264 | do_thread_safe: bool = True |
| 265 | release_native_memory_every_n_pages: int = 0 |
| 266 | keep_glyphs: bool = False |
| 267 | keep_qpdf_warnings: bool = False |
| 268 | |
| 269 | |
| 270 | def _compile_decode_config( |
no outgoing calls