I'm trying to use Laravel Excel (maatwebsite) to build a simple function to upload an Excel file and convert it to pdf straight away.
I'm looking for something like that (conceptual obviously) :
$file = $request->file('my_excel');
$excel_object = Excel::import($file);
$excel_object->export('/my/storage/path/my_file.pdf');
Can anyone please explain how to achieve or point me to a relevant example ?
thanks a lot
Adam
The easiest way would be to use a package like "Html2Pdf". You should make a blade file with your data, render it to HTML and convert it to pdf.
Related
I am using Laravel and I have pdf file and i need dinamicaly fill there some fields data.
How can i do this without PDF View?
you can't edit a pdf file to fill his fields, what you can do is generate a pdf file and pass the content with the fields already filled, here is a library to do it: https://github.com/barryvdh/laravel-dompdf
I found this solution. I can do it by php-pdftk library library.
you cannot edit the pdf files directly , you got to create fields inside the pdf which can be read by the library. You can try this package strongbond/pdf-filler-laravel , i had a similar situation also wanted to add signature into the pdf which lead me to build this library.
I have to generate a page data of my web site in PDF format. I need to export all the dynamic data with line, bar and pie charts. Is it possible to download in pdf format? For reminder, I am using laravel-dompdf to generate a file.
Let me know if you have any solution for this.
Thanks in advance.
I did research on it, we can not directly convert chartjs into pdf but what we can do is we can convert JS chart into image format and append into tag. Then, we can easily convert them into pdf format.
Let me know if anyone need in detail.
Thanks,
i am looking for a method to convert a pdf document into corresponding html document using abcpdf. kindly let me know if it is feasible. FYI, My pdf document has rich text along with images.
You can. Try this. Hopefully it'll work.
var doc = new WebSupergoo.ABCpdf10.Doc();
doc.Read('your Pdf byte array');
doc.Save('your HTML file path with .html extension');
doc.Clear();
doc.Dispose();
For documentation please have a look at the note section
http://www.websupergoo.com/helppdfnet/source/5-abcpdf/doc/1-methods/save.htm
To export as XPS, PostScript, DOCX or HTML you need to specify a file path with an appropriate extension - ".xps", ".ps", ".docx", ".htm", ".html" or ".swf". If the file extension is unrecognized then the default PDF format will be used.
You can definitely convert HTML to PDF, but I am not sure the inverse is possible to do with abcpdf.
Perhaps you can give a try to iText (iTextsharp)
I am looking to create pdf packages/portfolios using abcpdf9. What is the way to do it?
I have just started exploring abcpdf9. Any sample codes/link??
This is not possible with abcPDF.
One way to approach it is to use iTextSharp. The following article shows some information on how to approach it.
How to merge PDFs into a PDF Portfolio?
i have a checkbox in the lead entity.When i check on the checkbox,a PDF Note should produce
pulling information from the Lead form and is emailed.Here how will i create a pdf note pulling
information from Lead and email?Can anyone tell me how to do this?
Thanks
Adhars
If you haven't already solved your problem, the best way to do this would be to write an SSRS report that then exports to PDF. You can have your button link directly to the report with the Export to PDF parameter in the querystring.