psliwa / PdfBundle

This bundle integrates Symfony2 with PHPPdf library.
http://ohey.pl
MIT License
120 stars 45 forks source link

errors to render pdf #51

Closed jcaido closed 10 years ago

jcaido commented 10 years ago

I get a lot of errors: Warning: Ignoring invalid character "63" in hex string Error: Invalid XRef stream header Warning: Unsupported feature "unknown" Warning: Indexing all PDF objects can you help me?

psliwa commented 10 years ago

Did you resolve this problem? If you did, can you say more about the problem and publish solution?

If you didn't, can you show xml document what causes this errors? It might be helpfull to help you ;)

jcaido commented 10 years ago

Since I resolved the problem. The solution is that the annotation @ pdf must be into the class and before the driver, not out of class

not correct: use Ps\PdfBundle\Annotation\Pdf; /* * @Pdf() / class DefaultController extends Controller { public function pdfCitaAction() { $formato = $this->get('request')->get('_format'); return $this->render(sprintf('CitaBundle:Default:pdfCita.%s.twig', $formato)); } }

correct: use Ps\PdfBundle\Annotation\Pdf; class DefaultController extends Controller { /* * @Pdf() / public function pdfCitaAction() { $formato = $this->get('request')->get('_format'); return $this->render(sprintf('CitaBundle:Default:pdfCita.%s.twig', $formato)); } }

pdf commented 10 years ago

Please use backticks:

echo("Don't subscribe @pdf to things, and you get highlighting, too!");

when posting code.