Rzadko się odzywam, ale jak już to z problemem nie do rozwiązania :-).
Tym razem pytanie - czy ktoś rozwiązywał problem zabezpieczenia PDFów hasłem, generowanych przy użyciu biblioteki Zend PDF? Nie mogę znaleźć żadnych informacji na ten temat w necie, jakby zmowa milczenia... Jedyną biblioteką implementującą hasłowanie PDFów w PHP jest zdaje się FPDF w rozszerzeniu FPDI. Nawet nie mogę znaleźć pytań na forach w tym temacie... Może czegoś nie wiem?
Pewnie pozostanie mi napisanie własnej implementacji pod Zenda, biblioteki raczej nie zmienię. Możnaby się powzorować na FPDF ale tam jest trochę inna struktura klasy i inaczej wygląda "render', więc zabawy pewnie by było sporo.
Jakby ktoś miał jakieś info, uwagi albo propozycje, dajcie znać.
Pozdrawiam!
Coś znalazłem...
http://tuanngominh.wordpress.com/2009/09/2...n-for-zend_pdf/
Jak by ktoś miał chęć zajrzeć, popróbować... Biblioteka nie działa pod nowym Zendem, po ominięciu problemów wstępnych (nowa implementacja interfejsu) próba dodania czegokolwiek kończy się fiaskiem. Poniżej zamieszczam treść commentu jaki wysłałem do pana autora, czeka na moderację, o ile się w ogóle doczeka. Jakby ktoś się bawił, może być pomocna.
Cytat
Hello, I’m trying to refactor your code in my project, but I’, having problems… Probably becouse the Zend Framework has changed and the source on the googlecode not.
First of all, I had to adapt your version of ElementFactory to fit new ElementFactory_Interface, but I managed to do it quite easily.
Files with one clean page work perfectly – the password checking is OK. But I have problems when I put anything on the page. I cannot write text, in fact I cannot even attach resource like a font, neither can I set a default font. Every change made to the $page ends with an error (after reading password of course).
I checked source of outputed PDF and compared it with one generated by Adobe Acrobat – they don’t look quite similar (the second one is definitely more secure) but for my purpouses your version would be OK (secured only texts and resources).
If you have any idea why it works like this or you have an update released somewhere else – please let me know.
After I get this code working in new ZF, I’m planning to make it work with already built, unsecured PDFs. If you have any propositions, ideas, etc., do not hesitate to let me know .
I’ll write more if I get something useful…
First of all, I had to adapt your version of ElementFactory to fit new ElementFactory_Interface, but I managed to do it quite easily.
Files with one clean page work perfectly – the password checking is OK. But I have problems when I put anything on the page. I cannot write text, in fact I cannot even attach resource like a font, neither can I set a default font. Every change made to the $page ends with an error (after reading password of course).
I checked source of outputed PDF and compared it with one generated by Adobe Acrobat – they don’t look quite similar (the second one is definitely more secure) but for my purpouses your version would be OK (secured only texts and resources).
If you have any idea why it works like this or you have an update released somewhere else – please let me know.
After I get this code working in new ZF, I’m planning to make it work with already built, unsecured PDFs. If you have any propositions, ideas, etc., do not hesitate to let me know .
I’ll write more if I get something useful…