add flags to turn pdf on and off