Encrypting PDF changes page orientation

Chris Buergi <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Organization Enerhaus Web Services GmbH
Message-ID <[email protected]>
Hi,

I'm using the encryptPdfInMemory() to protect a PDF from being edited.

My input PDF contains one page with landscape orientation (about half 
way in the doc), the rest of the pages are in portrait. Now when I 
encrypt the PDF the landscape page gets converted to portrait, but the 
content stays as it was in the input data, thus cutting off some of the 
content.

I also tried to encrypt the PDF through the command line, which gives 
the same result.

The code I use to encrypt is the following:
encryptPdfInMemory(pdf_bytes, '', 'password', canModify=0, canCopy=0, 
strength=128)

The PDF is generated from a RML file, where I change the page 
orientation like this:
... some pages in portrait ...
<setNextTemplate name="report_a4_landscape"/>
<nextPage />
... some tables and text ...
<setNextTemplate name="report_a4_portrait"/>

I'm happy to send the input PDF if needed for reproducing the issue.

Further, I'm using Reportlab Version 2.7 with Python 2.7.

Thanks,
Chris

-- 
Enerhaus Web Services GmbH
Postweg 7
4528 Zuchwil

Tel 032 685 25 05
Fax 032 685 56 06
www.enerweb.ch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.