I have a sample PDF. I want to manipulate it with data (add fullname + date) and add a signature field. When the user opens the PDF on his browser and signs it, I want to save the pdf to my database and get notified on my backend side (when success).
I am familiar with php; thus I came across with 'fpdf' and 'tcpdf'. However, I couldn't figure out if what I want achieve is possible with those, but I don't think so. I can open pdf and add line from fpdf but I can't achieve anything with signatures.
What is the best/easiest way to achieve what I want to achieve? From php am I capable of such thing?
Should I try to generate the pdf from html? Is it possible to achieve what they are doing with C# in php? Or should I use completely different language for such thing?
Related
I have a conception problem and before coding I would like your help.
My goal is to create an app that call an api, gather the data, analyze it, create a report from it and lastly send it by email.
I managed to get the data (as json) with c#, to deserialize it and to make my analysis.
I would like to know what would be the best way to create a nice pdf with the data. My goal would therefore to create for example an html template, that every time I call out my api it modify the content of the template and generate from the html a pdf.
If I think about html it is because I know that I can do my html exactly as I am please, but the problem is the conversion to pdf that sometimes destroy a bit the style.
I know that with visual code I can create html pages, and I would like to know if I can modify the content from a c# page if it is the same project.
If not, can you recommend anything in order for me to do a pdf exactly as I am please with the dynamic content
Thank you
I've written a webpage (HTML & PHP) where a user can fill in various data into a form (using text-inputs and checkboxes). This data should be added to an already existing .docx template (MS Office Word).
Now I chose PHP because I thought PHPWord would offer the solution to all my needs... but it failed me, and I am not clever enough to adapt to the code make it work somehow. So I looked for another Library that could actually insert tables and images in .docx Templates and found DocX (http://docx.codeplex.com/). But this Library is design for .NET. Now I'm hoping DocX will offer the solution I need or my boss will hang me for wasting time.
So on to the question:
I somehow need to port the data gathered in the webpage from PHP to C#. But I'm not entirely sure how one should go about doing this...
I thought maybe I could transform the data into JSON or XML and somehow read that into my C# program. But I don't understand how to "pass on the data"... do I write to a file and read that file every 5 seconds? Do I create some kind of socket/listener on a certain port? Can I somehow trigger an event in C#? My programming knowlegde is lacking...
Could someone please push me in the right direction?
I have a C# .NET Windows Form with text fields. The user enters data into this form and once they submit I need to generate a PDF file with their data arranged neatly. What is the best way to do this? Should I move the data into a database or can I directly export to PDF?
There is no need to add it to a database if you don't want to persist the data for later use. There are tons of libraries out there for pdf creation in c#.
Here's a post made not long ago with some great references. It also covers almost the same topic.
you want to export directly to pdf. are you have any specific format, how it should Looks.
otherwise create a crystal report. Design a format.After that write this code
Crystalreportobject.ExportToDisk(ExportFormatType.PortableDocFormat, name + ".pdf");
ExportToDiskMethod can Export directly to PDF
I am thoroughly confused with something I want to do and am looking for some advice.
One of my client has to produce monthly invoice detailing all of the company expenditure, and two other such invoices. The client is sure that he only needs these invoices - and they are extremely simple enough to produce as far as logic is concerned.
Now, to make the actual invoice, I don't really want to use reporting solutions like Telerik, SSRS etc.. as I think they are an overkill for my purpose. At the same time, I am not sure how I can get the printer to print the invoices in a neat pages without cutting off anything.
I am very tempted to just give the output in a webpage and ask my client to print them off from there.
Am I not looking at this the right way? Is this possible?
I could use ITextSharp or something to produce pdf's.. In fact, I think I will go ahead with this if it isn't possible to just output to html page and get the printer to recognize the page breaks somehow.
Because this is a very small job, I don't want to spend too much time on it as the cost of this freelance project is minimal too.
The reason printing to a new page is important is that my client has a few shops he deals with and he would want to print each of his customers their own invoices. I can get him to produce each customer's invoice separately and print them but it is not ideal way to deal with it.
thanks
There is a css property which should tell a browser to break a page: page-break-before.
But if you have a a wide list of browsers to support, it would be better to get some HTML to PDF conversion library or really use iTextSharp (as far as I know there is even a module/class which allows to conver HTML to PDF with iTextSharp) as printing web pages has many issues.
In the past, when I wanted to create a reusable document, I used Word or Excel XML formats.
See: http://en.wikipedia.org/wiki/Microsoft_Office_XML_formats
They are easy to create and tweak, then all you have to do is recreate the dynamic parts in your code. All you have to do is save the document in Office XML format, then open it up in word pad to see where to make your changes.
SSRS has a drag and drop interface for designing reports and has a PDF output option. If the data is in a SQL server database then even with the learning curve it should be easier to do SSRS reports.
I need a way to print selected documents in a library from the ribbon. As I understand it, this will have to be done through scripting. So the main difficulty seems to be the fact that everything will need to be done client-side. Another not so tiny factor is that it has be a generic document printing button, not just for pdf or office documents.
Is there any way to tell the OS/browser to launch for each of the selected items/documents its appropriate program's printing options/window?
Also I want this to be generic to document libraries so I can't just map one as a remote disc.
Another solution that springs to mind is to transfer the selected documents to another document library under the care of an event handler that runs the neccessary c# commands for printing when a new item is added to said(hidden) document library.
Another thing that comes to mind is to basically reiterate what most print drivers already do with the Print to file option where they create a pdf document of the intended material then it would be just a matter of printing the created pdf. But then the printing applications already know the file they have is in the correct/accepted format and merely have to make the convertion to pdf.
Is there any way to use the OS to just open/print-to-file my document with the correct application?
Any help with the script or c# part would be great. Thank you.