I'm using ReportLab to create a PDF page in python. This created page contains a single line of text. I want this line to become unselectable in the PDF. How can I achieve this?
Here is a sample code of how I create the page with a single line.
from StringIO import StringIO
from reportlab.pdfgen import canvas
...
buffer = StringIO()
canvas = canvas.Canvas(buffer)
canvas.drawString(30, 30, "Hello world!")
canvas.save()
...
In the generated PDF, Hello World! will be selectable by the PDF viewer, which is undesirable. How to avoid it? I must output a string that will be different every time I run the program, so drawing a static image is not a solution.