[TYPO3] pdfgenerator produces wrong file
Michael Christensen
michael at stenskjaer.dk
Sun Oct 5 22:38:32 CEST 2008
Michael Christensen skrev:
> Philipp Gampe skrev:
>> Michael Christensen schrieb:
>>> Hi list!
>>>
>>> I have a problem with the pdfgenerators (I've tried pdfgenerator2 as
>>> well as nc_pdfgen and the same problem occurs).
>>>
>>> I can include the link on my page, but when i press the link it
>>> downloads a file named index.php - if I try to rename the file to pdf, I
>>> see, that it's got pdf-content and looks good, but the file i get
>>> downloaded is a php.
>>> When I try to download the pdf from Safari, it works - but any other
>>> browser I've tested, downloads the index.php
>>>
>>> Any ideas?
>>>
>>> Thanks in advance!
>>> Michael
>>
>> Hi,
>>
>> do you get any error message like can't modify header information or
>> something like this... it sounds to me that it does not send the right
>> header along so the browser threads it like a .php
>>
>> I would check anything which has to do with the header and or meta tags
>> safari properly looks at the content of the file and therefore adds the
>> right extension
>>
>> Best Regards,
>> Phil
>
> Well, I solved the problem - more or less..
> I changed the config to simulateStaticPdf and added the .htaccess
> configuration and then it worked with normal content (a bit edgy, but
> probably just needs some adjustments), but with news content (tt_news),
> it returns the error: FPDF error: GIF parser: unable to open file clear.gif
>
> - Michael
Just to bring a little update:
This is very strange! When I try to create the pdf-link with news
content it works if I have just clared the typo3conf cache - second time
I try after clearing the cache which makes it work - it doesn't work
again! But the error-message is different, it then makes a 404 error
(file/page couldn't be found). By the way: if there is an image in the
news record it makes the error mentioned before (FPDF error: GIF parser:
unable to open file clear.gif). But alas, it gets even weirder, for in
Safari it makes an error popup saying "File does not begin with '%PDF-'"
- but not only with tt_news, but any kind of content now!
What is going on?
Can anybody help me?
More information about the TYPO3-english
mailing list