[reportlab-users] Automatically set Page Scaling and Print?

Andy Robinson andy at reportlab.com
Mon Oct 1 15:40:07 EDT 2007

On 01/10/2007, Robin Becker <robin at reportlab.com> wrote:

> .......

> well it didn't turn out too hard. I added this at the end of canvas



> canvas.setViewerPreference('PrintScaling',PDFName('None'))

Well done, Robin.


> It seems all the entries in ViewerPreferences are names so perhaps we can agree

> to eliminate the callers use of PDFName.

I agree, simple strings (or None, or whatever it needs) are the best.
Is it possible to list the common preferences available in the

We had a glitch this week on an (internal) project using PDFNames - we
accidentally used pathnames with forward slashes in some Form XObject
names, which caused Acrobat Reader to open without errors but display
blank pages. To guard against this I think we should check internally
that the string passed in is a valid PDF Name, and raise a helpful
ValueError if they pass in something which isn't.

- Andy

More information about the reportlab-users mailing list