Export HTML as PDF in JQuery for Persian - javascript

I used some free jquery libraries like jsPDF and html2pdf to export html as PDF in jquery. But non of them work properly for Persian language. How to export/convert html to PDF for Persian with Persian fonts in jquery or javascript?
please help me!

You can use DocRaptor. It works for Persian and other utf-8 languages. but it's not free. In free version of library, advertising bar will be added to exporting PDF.

you can create a simple page with your report as html, and use Microsoft Print to PDF-se (Ctrl+P) to print to PDF-se and save locally

jsPDF can only render simple HTML to PDF
See below image, There is a tag which is not displaying properly in PDF view:
You need to use iTextSharp in order to generate PDF from server side. it will also support Persian font.

Try to use html2pdf library for properly export Persian/Arabic characters.

Related

generate pdf support arabic language

I want to generate pdf file from my php script that support utf-8 "arabic language"
like -> "السلام عليكم "
that support RTL
i make small search and i found some library like fpdf but it's aint support arabic and also tpdf
and i found tcpdf but it's need as i "think" using laravel in my project ?
i am not using MVC i just using normal web development .
If you want to programtically generate the pdf and send it in email attachment the TCPDF library is the best solution for you. The TCPDF provides fonts for Arabic and Farsi. However, it looks like the TCPDF does not support RTL.
I would also suggest you to give DOMPDF a try. DOMPDF generates PDF with HTML with ease. Read more here: https://github.com/dompdf/dompdf
I have used both to generate the PDF for all kind of non-latin chars.
EDIT:
Don't forget to add dir="rtl" in the html. Please read more here: https://www.w3.org/International/questions/qa-html-dir
Also, please show your code if you can. So I can help you more.
If your page has Arabic words
<script>
window.print();
<script>
This will give you option to print or save PDF. Hope this will work.

PHP generate PDF and edit

I would like to ask
Is it possible to edit the PDF file? For example, insert a new pages between pages , like add page between page 17 and 19.
Which library can i use?
one way to do this is to use ghostscript to split the pdf into individual page images and then you can add additional pages and rearrange pages as needed with tcpdf or similar pdf library.
You can generate pdf easily using FPDF library http://www.fpdf.org/. But you can not edit them via this library. You can use FPDI library mentioned here: PDF Editing in PHP?.
Here is my view:
It is easy to edit Hypertext rather than PDF it self. I use TCPDF to convert HTML to PDF.
Take a look at this. It might be helpful : TCPDF_import is not bringing in an existing file
Thanks, Let us know if you find a better solution.

How to export excel files using excel-builder.js

I have been working on a project with Angular 1 which will require me to build functions to export excel file with some formatting from browser. I found excel-builder.js can be very powerful and useful, but the current tutorial website: http://excelbuilderjs.com/ is not accessible anymore. Can anyone provide me any documentation, especially for excel file formatting?
Thank you very much!
you can make excel from html table.As i create a fiddle here http://jsfiddle.net/dssoft32/WPpDm/36/
All colors and styles will work inline css. you can custom as you want. I have also user the Filesaver.js to download Blob object.

Highcharts PDF export arabic file name

I am using arabic language in some files. when i want to download these files as PDF with arabic file name seems not working with highcharts export server.
chart.Exportchart({})
See the fiddle here http://jsfiddle.net/w4bhbhnb/
Is there any workaround for this in Highcharts?
Yeah, got it this is the working demo http://jsfiddle.net/w4bhbhnb/1/
chart.Exportchart({})

Convert HTML Report to PDF

I want convert an HTML report to PDF. I know that there are so many libraries are available for this purpose. But the HTML report contains so many graphs created using Jqplot. I want to include these graphs in the PDF also. If you are familiar with any library which also convert graphs to PDF, please give me the reference.
you can use bullzip pdf printer it creates a virtual pdf printer that can transform your HTML content to a pdf file from the browser:
http://www.bullzip.com/
you can also find a lot of useful tools right there!
I don't have experience with Jqplot, but I have successfully converted html pages which contain pie charts from Google Charts (completely javascript generated) to pdf.
I used wkhtmltopdf - it's a commandline tool but there are wrapper classes for php and some others I believe.
I'm sure you could find something applicable with a bit of googling but this looks promising: https://github.com/mikehaertl/phpwkhtmltopdf

Categories

Resources