Search code examples
pdf-generation

Reproduce zathura's recolor function


is it possible to programmatically reproduce zathura's recolor function? I would like to write a program that takes a pdf file as an input and spits out a pdf file with zathura's "recolor" transformation.

I've searched but am not aware of existing code /software that does the same thing.

related links: https://git.pwmt.org/pwmt/zathura


Solution

  • It's difficult to change pdf content directly to change it's color, because the color of text is set in pdf's format file. zathura recolor function don't change the pdf content but just get the image output and recolor it(maybe change the tone?). Maybe you can try first convert pdf to image and then change it's color, that will be more feasible.