# Settings

Some of pikepdf’s global parameters can be tuned.

pikepdf.settings.get_decimal_precision()

  Set the number of decimal digits to use when converting floats.

  Return type:

    int

pikepdf.settings.set_decimal_precision(prec)

  Get the number of decimal digits to use when converting floats.

  Parameters:

    prec (int)

  Return type:

    int

pikepdf.settings.set_flate_compression_level(level)

  Set compression level whenever Flate compression is used.

  Parameters:

    level (Literal[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) – -1 (default), 0 (no compression), 1 to 9 (increasing compression)

  Return type:

    int