PHP generate PDF and edit - javascript

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.

Related

vuejs pdf from html

I need to generate pdf and paste the values of variables in certain places. In fact, this is going to be an order confirmation on my site. Later I will store it on firebase storage. which library do you recommend? Is there any way to generate pdf from html layout?
Yes, there are.
Python has : xhtml2pdf to convert html to pdf.
Otherwise, I would strongly recommend reportlab (still for python)
If you prefer to use Javascript there is PDFKit

Need ScriptReferenceProfiler.dll or alternate

I improving site performance and for that, I try to Bundle or combine ScriptResource.axd and Webresource.axd but before combine to I need to know javascript file reference name which is used by ajax control toolkit in asp.net web form
like this https://lancezhang.wordpress.com/2008/11/15/aspnet-ajax-performance/
I need ScriptReferenceProfiler.DLL to get a reference of the javascript file which is used in ajax toolkit on the web page.
do you have any idea to get this dll file
I go through this tutorial
https://channel9.msdn.com/Blogs/ASP-NET-Site-Videos/using-script-combining-to-improve-ajax-performance
Or if you have any alternate solution please let me know
The file you looking and reference from the link you add was here : http://aspnet.codeplex.com/releases/view/13356
I can not find it now so I uploaded for you here, both source code and binaries.
http://planethost.gr/so/ScriptReferenceProfiler.zip
http://planethost.gr/so/ScriptReferenceProfilerBinaries.zip

Dynamically Saving Images to a PDF template

I'm building a website where people can pick several pictures from a range.
I then want the users to be able to create a PDF using those pictures. However I want those pictures inserted in predefined positions and sizes in a template I have already created which will contain other predone materials (words pictures etc).
So my question :
its possible ?
Can anyone recommend a library which will satisfy my needs, I have had a look and I cant see any PDF libraries that seem to mention templates
Any guidance on where to start will be greatly appreciated.
Yes, this is completely possible.
I would recommend using wkhtmltopdf to generate the pdfs from an html template.
Another handy library for this kind of work is image.intervention
Both of these would work with PHP.
If you're working in javaScript you may want to use PDFKit
Edited: Only if you use php.
There are several libraries you can use to generate a pdf depending on what template you will build your pdf. I hardly recommend TCPDF. You can use html to layout the design you want or you can embed the image directly on a page. See an example here.

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.

convert html into jpg and send mail - PHP

I have an HTML which contains images and javascript charts. I want to convert that HTML into an image and send as an attachment through email.
Is it possible?
If yes, which library should I use for this task?
Yes it's possible, but for that you need to use phantomjs.
Here is a php library i used for phantomjs.
http://jonnnnyw.github.io/php-phantomjs/
Its pure php solution (using phantomjs browser) and is very easy to use. Just install this library through composer and that's it you should be good to go.
Note: This solution is valid if you want to take screenshot of your html page through its URL.
Hope it helps :-)

Categories

Resources