I found this beautiful example making a fractal paper tear out text box, but I can't get it to work, when I open it in overleaf

http://www.texample.net/tikz/examples/torn-paper/
The code looks like this, please open the original from the link
Code: Select all
Code, edit and compile here:
% Torn paper with matching torn edges% Author: Jose Luis Diaz\documentclass[a5paper]{article}\usepackage{lipsum} % To generate test text\usepackage{framed}\usepackage{ifthen}\usepackage{tikz}%%%<\usepackage{verbatim}\usepackage[active,tightpage]{preview}\PreviewEnvironment{center}\setlength\PreviewBorder{10pt}%%%%>\begin{comment}:Title: Torn paper with matching torn edges:Tags: Styles;Fractals;Decorative drawings;Fun:Author: Jose Luis Diaz:Slug: torn-paperThis example is similar to: http://texample.net/tikz/examples/framed-tikz/Fractal decorations are used to achieve a torn paper effect.The bottom of one piece matched the top of the next one.This is done by resetting the random seed before drawing each border.However, you get the "same" random border in all your fragments,which is not nice. You want randomness in each new bottom border,but exactly the same randomness in the next top border. In order to get this,you need a global counter which is increased in each "paper fragment",and which is used as seed for the bottom border.It is neccesary to use \pgfextra to be able of setting the seed in the middleof the path (i.e: between top and bottom borders).In addition, there is the problem that both paths (top and bottom) have to bedrawn in the same direction in order to get the same contour.In order to fill the piece of paper with a background, it is not possibleto draw both top and bottom borders in the same direction (eg. left to right).So the solution involves drawing one piece of paper visiting its corners inclockwise direction, and the following one in counter-clockwise direction.I use the counter mathseed and draw in one direction or the other based

Overleaf throwing error:
Code: Select all
Package pgfkeys Error: Choice 'bilinear interpolation' unknownin choice key '/tikz/shade'. I am going to ignore this key.See the pgfkeys package documentation for explanation.Type H <return> for immediate help....l.146 }
As I am still quite a greenLaTeXhorn, I would be glad for a helping hand getting this example to work. Thank you.