Global Config¶
All the settings for xpdf
is managed through a global object
Config
.
For most use case settings available from Config
will be sufficient, but if you want more you can load a xpdfrc
file.
See :
Config¶
-
pyxpdf.xpdf.
Config
¶ Global XPDF config object
-
Config.
reset
()¶ Reset the global configuration to default.
-
Config.
load_file
(cfg_path)¶ load the settings from given cfg_path xpdfrc.
-
Config.
add_font_file
(font_name, file)¶ Maps a PDF Font font_name to font from path file. The font files can be Type 1 (.pfa or .pfb) or TrueType (.ttf or .ttc)
-
Config.
text_encoding
¶ Sets the encoding to use for text output. ‘UTF-8’, ‘Latin1’, ‘ASCII7’, ‘Symbol’, ‘ZapfDingbats’, ‘UCS-2’ is pre defined. For more encodings support install
pyxpdf_data
package (see Installation). (default is UTF-8)- Type
str,
-
Config.
text_eol
¶ Sets the end-of-line convention to use for text output. The options are
unix = LF
dos = CR+LF
mac = CR
(default, platform dependent)
- Type
{‘unix’, ‘dos’, ‘mac’}
-
Config.
text_page_breaks
¶ If set to True, text extraction will insert page breaks (form feed characters) between pages. (default is True)
- Type
-
Config.
text_keep_tiny
¶ If set to True, text extraction will keep all characters. If set to “no”, text extraction will discard tiny (smaller than 3 point) characters after the first 50000 per page, avoiding extremely slow run times for PDF files that use special fonts to do shading or cross-hatching. (default is True)
- Type
-
Config.
enable_freetype
¶ Enables or disables use of FreeType (a TrueType/Type 1 font rasterizer). (default is True)
- Type
-
Config.
anti_alias
¶ Enables or disables font anti-aliasing in the PDF Output Devices. This option affects all font rasterizers. (default is True)
- Type
-