Welcome Guest, Not a member yet? Register   Sign In
Cant get ufpdf to work
#1

[eluser]bjora857[/eluser]
following the guide in
fpdf library

I was able to create a pdf using this code:

Code:
define('FPDF_FONTPATH',$this->config->item('fonts_path'));
    
    $this->load->library('fpdf');
    $this->fpdf->Open();
    $this->fpdf->AddPage();
    $this->fpdf->SetFont('Arial','B',14);
    $this->fpdf->SetY(30);
    $this->fpdf->Cell(40,10,'Faktura!');
    $this->fpdf->Cell(60,10,'åäö');

$this->fpdf->Output('output.pdf','D');

But there are no support for swedish letters: å ä ö.

So i downloaded ufpdf, I put the updfp.php in the library folder next to fpdf.php

Then I tried this code:
Code:
define('FPDF_FONTPATH',$this->config->item('fonts_path'));
    
    
    $this->load->library('ufpdf');
    $this->ufpdf->Open();
    $this->ufpdf->AddPage();
    $this->ufpdf->SetFont('Arial','B',14);
    $this->ufpdf->SetY(30);
    $this->ufpdf->Cell(40,10,'Faktura!');
    $this->ufpdf->Cell(60,10,'åäö');

$this->ufpdf->Output('output.pdf','D');

But it gives me lots of errors and no pdf...

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 70

Filename: libraries/ufpdf.php

Line Number: 41

.
.
.

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/franke/canvasfabriken.se/canvas0.1_system/libraries/Exceptions.php:164)

Filename: libraries/fpdf.php

Line Number: 1037



What shall I do?




Theme © iAndrew 2016 - Forum software by © MyBB