Questions tagged [fpdf]

1

votes
0

answer
89

Views

FPDF: Local saved pdfs are damaged

I've got a project where we output some data as pdf in the browser. The user also can download the pdf directly. If we run the project on our local machine the pdf creation and the view works without problems. But if we put the project online we've got a problem that the pdf which is generated by F...
Florian Bader
1

votes
1

answer
673

Views

How to use TCPDF with FPDI in a laravel project

I am using FPDI to generate PDFs from a template.pdf file in a Laravel 5 project, but I am having issues with UTF-8 names since FDPI does not support the encoding natively. I did a lot of searching and tFPDF and TCPDF seem to be the most used solutions for this issue, though I cannot seem to success...
matpulis
1

votes
0

answer
157

Views

How bind link to call java script function in FPDF

I am trying to call javascript function by clicking on link but no success. class PDF_AutoPrint extends PDF_JavaScript { function alert(){ // write some JavaScript code $js = 'app.alert('JavaScript Popup Example', 3, 0, 'Welcome');'; $js.= 'console.log('heeeeeeeeeeeeeeeeeeeeeeeeeee');'; } $pdf = new...
learner
1

votes
0

answer
41

Views

FPDF: How to limit the fetch data so footer will not add to next page

How can I add a limitation on the output so that the footer will not go to next page? class myPDF extends FPDF{ function header(){ $dates = new DateTime(); $date2 = $dates->format('Y'); $date=$_POST['month']; $this->SetFont('Arial','B',14); $this->Cell(189,5,'ABSTRACT OF COMMUNITY TAX CERTIFICATES',...
Waine Calado Banayat
1

votes
1

answer
239

Views

Fixed No of Rows per each page while printing in Pdf format using FPDF in Codeifniter

I Have a Table in that 31 records are there.when I click on the print button data showing on the PDF format fine.But is taking by default 16 rows per page.I want to display 10 rows per each.How would i do that.I am new to codeigniter and FPDF Please somebody help me thanks in Advance. This is my fun...
itsme
1

votes
0

answer
170

Views

Why are the text characters in PDF stacked on top of each other?

I am creating a PDF using FPDF. The PDF renders to the web page fine, 95% of the time. Occasionally, the PDF will render to the page with all the text characters aligned left, but stacked on top of each other. As if the letter spacing is set to zero! When I right-click on the web page and click 'Pri...
Bigfootbud
1

votes
1

answer
301

Views

print data from mysql into a pdf file using php

I am using FPDF for the PDF and so far in my search I saw this similar question to my question and followed the code there and when I ran it no Error was being called and the PDf can be downloaded. But the problem is when I open the PDF file it is empty and I can't seem to understand the problem. Th...
Brix
0

votes
0

answer
9

Views

PDF file will not create “properly”

I am making a Python program for a local school however I cannot seem to get the PDF file's text to be created appropriately. Each cell only contains one letter where I'd like the entire text to be there. I have tried loops, while etc. however nothing has worked due to errors which I cannot fix. Cha...
J Silver
1

votes
1

answer
28

Views

How to break Line in mutlicell using fpdf in php?

$pdf->Multicell(0,8,'Name of Mineral/ore:'.implode(',', $_POST['nom']),0,1); $pdf->SetX(30); using this code I m getting outfit like this how can I break this like and see my output in one same line?
Riddhi Desai
1

votes
1

answer
45

Views

Can spl_autoload_register() be used to add external functions in FPDF?

I would like to put my item creation function code into their own file and include them in my main PDF formatting class... Is this possible in FPDF? I would like to keep the functions below out of my main FPDF creator class .... I will have 5 or 6 categories with possibly 20 items and adding all th...
Bigfootbud
1

votes
0

answer
178

Views

UNICODE fonts not displayed in pdf created using TFPDF

I have crated a pdf file using TFPDF php library. I have added some Hindi Text to the pdf. Only that hindi text is not visible(its in white color) in pdf. I have tried changing color but still its not visible. following is the code I used HelloWorld.txt contains English: Hello World Greek: Γειά...
Atish Bundhe
1

votes
1

answer
271

Views

FPDF bullet list

I found some code here: http://www.fpdf.org/en/script/script56.php That works all the way up to the array part. The sample text it provides is bulleted, but it just keeps repeating. There doesn't seem to be some sort of delimiting so the sample text will break out into a list of separate items The s...
user6096423
1

votes
0

answer
61

Views

How to arrange the table from left to right in fpdf multicell?

How to arrange the table from left to right in fpdf multicell? This is my code $pdf->MultiCell(12.5 ,4,'',1); $pdf->Cell(12.5 ,7,'',1,0,'C'); $pdf->Cell(20 ,7,'',1,0,'C'); $pdf->Cell(60 ,7,'',1,0,'L'); $pdf->Cell(25 ,7,'',1,0,'C'); $pdf->Cell(25 ,7,'',1,0,'C'); $pdf->Cell(25 ,7,'',1,0,'C'); $pdf->C...
Patrick
1

votes
1

answer
209

Views

FatalErrorException Class 'Codedge\Fpdf\FpdfServiceProvider' not found

The question is this, I have a development in Laravel 5.0 and developed a small module to create a pdf using the FPDF library, the issue is that my local server works correctly, but when I upload the files to my web server I throw the following error: FatalErrorException in ProviderRepository.php li...
Alfonso Blancas
1

votes
1

answer
71

Views

Error : GetFilter cannot open stream of object because filter

I am getting this error while using FPDM library for binding data in Editable PDF. I want to bind this data to PDF. PDF has no issue at all. This code creates PDF for the first instance of Array only. When I am combining this code to Codeigniter, I am getting an error. You can see code of mine As b...
Dhruv Bhavsar
1

votes
1

answer
35

Views

render data from query in fpdf

I am using fpdf to generate reports but at time to generates the pdfs and rendering the data from query, all the records appear in the same position showing one over another in $pdf->SetXY How can I rendering the data in the pdf, each record appears one below the other? this is my code: the render...
Ing.LuisC
1

votes
0

answer
133

Views

PhpStorm - Undefined class FPDF

I'm using FPDF for the first time, I get an 'Undefined class' error the origin of which I cant comprehend. Here is the relevant code:
MrCoLLie
1

votes
1

answer
103

Views

Creating pdf using fpdf in PHP on 000webhost seen some error [duplicate]

This question already has an answer here: FPDF error: Some data has already been output, can't send PDF 11 answers I have trying this code But I see the below errors: Fatal error: Uncaught Exception: FPDF error: Some data has already been output, can't send PDF file (output started at /storage/ssd1...
A.S.Abir
1

votes
0

answer
137

Views

how to support bangla font in fpdf?

I made the font in 'bangla.ttf' to 'cp1252' using terminal. However, I don't know why it's not showing. is that correct or do you have any other solutions? Suggest me. And I also took the converted file to the fpdf font file. so that I can access. I converted other language but this one is not work...
Araf Hossain
1

votes
0

answer
117

Views

MultiCell results in black color

here is my code for the multicell part $pdf->MultiCell(30,10,rtrim(chunk_split($row['project_name'],30,'-\n'),'- \n'),1,0,'C'); but it shows black cells here
Ariel
1

votes
0

answer
64

Views

Is there any way I can add image in bytes to pdf in Python?

I generated some plots in pandas and save it in BytesIO streams, and then I want to add it to a pdf page, then send out the pdf file as attachment in email: import matplotlib.pyplot as plt import io from fpdf import FPDF fig = plt.figure() ... buf = io.BytesIO() fig.savefig(buf, format='png') pdf =...
Nathan
1

votes
0

answer
200

Views

How to make the white background of the pdf page transparent with FPDF - PHP

I am using FPDF to generate a pdf. I am placing an image onto the A4 page layout and do not want to see the white page background. Is it possible to make this transparent? I have tried the following code below, but this also sets any subsequent image added to the page also transparent. PHP with the...
eddy123
1

votes
1

answer
620

Views

how to create multiple id cards dynamically in fpdf using php and mysql

I was trying to create id cards using fpdf in which the data to be plased in the id card is coming from mysql database and i have successfully made it the problem is that i want to generate many id card like 10 id cards once and when i try the blow code it is generating the id cards but placing one...
infosa infosa
1

votes
0

answer
15

Views

FPDF - AddFont() from TCPDF fonts like (freeserif, kozminproregular,..)

In TCPDF, you can use special characters with freeserif and kozminproregular. But, I wanted to try it to FPDF, I tried downloading the FreeSerif.ttf and do cd C:/xampp/etc.. and get the FreeSerif.php and FreeSerif.z and do the $pdf->AddFont('freeserif','','FreeSerif.php). BUT the special characters...
Qing Fei De Yi
1

votes
1

answer
325

Views

How to directly show print page using FPDF PHP code?

I am working on generating the bill for a customer and I using FPDF and PHP for generating the bill. Here I don't want to use execute 'application/pdf'. Here I want to directly print in print screen without using PDF. How to convert FPDF PHP code to directly print the bill. As the image shows.
beta
1

votes
2

answer
130

Views

Bosnian characters in FPDF

I have an bosnian string $string = 'Saglasno odredbama čl.19 Zakona o udruženjima i Statuta Udruženja računovođa i knjigovođa Srbije URIKS iz Beograda, ul.' I used 'Write' function of fpdf http://www.fpdf.org/ but all 'č' characters become to 'è' $pdf->Write (6, iconv('UTF-8', 'CP1250//TRANS...
1

votes
2

answer
205

Views

tFPDF generates an empty pdf file

I am trying to generate a PDF file in PHP using the tFPDF library. I started with FPDF and it worked fine except that the UTF-8 characters were garbled. After some searching, I found that one could implement tFPDF to include UTF-8 characters in a PDF file. But all my attempts have resulted in an emp...
kalinma
1

votes
0

answer
186

Views

How to print text from a text file into pdf using fpdf and php

I am trying to display the text from a text file into PDF using FPDF and PHP. I searched many links and tried the following code but I am not getting the output. if(($FileType == 'txt')) { $this->SetFont('Arial','',12); $this->write(10,file_get_contents(project/demo.txt)); }
JyothiKanth
1

votes
0

answer
26

Views

FPDF How to create multiples page with FPDM

I need to create one pdf with multiples pages,i tried with FPDF and FPDM for single page is work good but i tried with this code.. thank you for your help
Juan Lock
1

votes
0

answer
28

Views

Summernote and FPDF

I am using this lovely Summenote WISWYG editor How can I use this in an PDF generated with FPDF When I use this example FPDF outputs: TestnotieOptie AOptie BOptie CBelangrijk
Muiter
1

votes
1

answer
284

Views

FPDF table cell padding

I have created table using cells in FPDF..But Im not able to give padding for the cells and the text starts exactly near to the margin.How can we give a padding space at the beginning of the text. I have attached the code here $w = array(90, 20, 20, 12, 20); for($i=0;$iCell($w[$i],7,$header[$i],1,0,...
affaz
1

votes
1

answer
31

Views

Why fpdi output not working in Drupal 7 but working outside of D7

I am creating a form that handles manage file type for pdf uploads. I am using fpdi. The issue is it doesn't download from the this code $pdf->Output('D'); Can anyone help me. Make it simple because I'm new to Drupal 7 as well. My code is similar to this. Check their page here: use setasign\Fpdi\Fp...
user3856437
1

votes
0

answer
173

Views

FPDF MultiCell & how to align specific cell in FPDF using PHP ?

I have two (2) questions. QUESTION 1 I have these code where the table that includes: Fetch value from database. Table with MultiCells. Text fits inside table cell. I create three (3) table, data from database and the result shows like table below. Code seem to break into new line after the first t...
Rozaimi
1

votes
0

answer
24

Views

FPDF section breaks

I have an array of elements in the following format: Array ( [rno] => 6 [first_name] => John [last_name] => Doe [gender] => Male [date_of_birth] => 1982-11-01 ) Is there any way to do a section break to show these values in 2 columns in the page. I do not want to do a page break, as there are more s...
user3774576
1

votes
1

answer
30

Views

FPDF Saving file in a folder on the server QNAP(NAS)?

Hi guys I have a script in FPDF and PHP to create and save a PDF document. The script is not working (I guess the way I save the path is wrong). I'd like the user to click save and the document must be saved on a folder inside the server that is hosting the website (in this case is a QNAP). This is...
TheNoobUser
1

votes
0

answer
34

Views

Row is added if no file is selected in a input type file

I have a small question, I have an Html form with a button...I have written some code for it so it saves the image name in a MySQL database. But if you select no image there is still a white line in the database. This is my code: $query = 'SELECT id FROM ncr_input ORDER BY id DESC LIMIT 1'; $resu...
Rob
1

votes
0

answer
48

Views

Lightbox and dynamic PDF

I would like to open a lightbox frame with a PDF file inside. I am already able to do it by using data-lightbox='iframe' and the pdf filename as href tag. The main problem is that i modify this PDF file on the fly (by FPDF/FPDFI) and i need to pass an array from jQuery to PHP PDF generation page. W...
Giuseppe Donato
1

votes
1

answer
74

Views

Can I pass my view to FPDF to generate PDF?

Previously i was working with dompdf in laravel application to generate invoices.. Its taking time in generating invoices but working perfectly . Below is the code of dompdf to generate invoice by just sending the view. PDF::setOptions(['dpi' => 150, 'defaultFont' => 'sans-serif']); // pass view fi...
Rehmat Sayany
1

votes
1

answer
24

Views

How to get value from combobox into next url

I wonder if anyone can help my problem, in which way I can get value from combobox selection into next url by clicking so I can make it as a parameter to the pdf report. this is my code to add some combobox : Bulan Januari Februari Maret April Mei Juni Juli Agustus September Oktober November Desemb...
SETYO
1

votes
1

answer
61

Views

Sending data from javascript to php to generate a pdf but doesn't work

I am using JavaScript to take the info from a form completed by the user, then sending this data to PHP and generate a PDF with FPDF. The problem is I want the browser to ask the user to save the PDF or view it online but I cannot figure out how. The PDF generates correctly but only when I save it...
luchitomario

View additional questions