21
SMEDrieben
Re: News 1.63 - PDF Creation: UTF-8 not working
  • 2010/2/1 15:07

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


1) I have similar problems.

I removed the news_html() prefixes. The first and second line show normal characters. However, the hometext and bodytext are not correctly displayed.

I removed:
$content news_unhtml($content);


I adapted the other suggestions in this thread: the chacracters in teh home and bodytext are displayed correctly as well.

However,... the hometext and bodytext are printed over line 1 and line 2 and over the data of the poster, post date etc. Is is a mess.

Any idea how to correct this problem ?

2) Herve has left the fpdf map: you can make your own choice. If you refer to makepdf.php the news_article block, pdf's are generated by the fpdf-system.

Thanks !

Drieben

22
SMEDrieben
Re: News 1.63 - PDF Creation: UTF-8 is working: header and body text problems
  • 2010/2/1 22:15

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


Finally, my characters are given correctly.

One problem remains: the hometext and bodytext is displayed over the header, post and date info. This only happens on the first page. There must a problem with the page length of the first page, using the pdf.php.

I cannot attach a file, otherwise I would show a generated pdf.

Any idea ?

SMEDrieben

23
culex
Re: News 1.63 - PDF Creation: UTF-8 not working and xLanguage Problems
  • 2010/2/2 11:17

  • culex

  • Module Developer

  • Posts: 711

  • Since: 2004/9/23


I can't replicate the problem on my site everything screens ok.

JvQ in xoopsnordic added these modifications to my changes to clear up subject / title issues, maybe they can help

line 251-257
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor($article->uname());
$pdf->SetTitle($doc_title);
$pdf->SetSubject($doc_title);
$pdf->SetKeywords($doc_keywords);

$firstLine $article->title();

24
SMEDrieben
Re: News 1.63 - PDF Creation: UTF-8 not working and xLanguage Problems
  • 2010/2/3 20:27

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


Thanks ! I tried your suggestions. It did not solve the problem, but I find out what is the cause !

When I add an image to the hometext or bodytext, such as:

[img align=right id=46]Imagename[/img]


my problem occurs. It is: the hometext (and or bodytext) are printed in the pdf over the header. The pdf gets unreadable.

If there is no Xoops-image code, the pdf is generated correctly.

Any solution ?

SME Drieben

25
SMEDrieben
Re: News 1.63 - PDF Creation: UTF-8 not working and xLanguage Problems
  • 2010/2/10 15:05

  • SMEDrieben

  • Not too shy to talk

  • Posts: 173

  • Since: 2009/6/17


I solved the problem in News by deleting the images. I used the thread above and added three lines to pdf.php:

$content str_replace('[pagebreak]','
'
,$content);  //after this line
$pattern[] = "//sU";
$replacements[] = '';
$content preg_replace($pattern$replacements$content);


Now the images are deleted, the text is perfect !!

SME Drieben

Login

Who's Online

354 user(s) are online (248 user(s) are browsing Support Forums)


Members: 0


Guests: 354


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits