Create and edit documents online

What language or technology will I need to be able to create documents on the Internet? I want to be able to add text and images and move them to position, resize, etc., Similar to this .

And then, when done, create a PDF from them.

Sorry if this is a little vague, I just need to know where to start the study.

0
source share
1 answer

You need to solve the basic technologies: Flash, Silverlight, Canvas, client-side SVG, server-side SVG, or server-side bitmap. There are also commercial solutions that work with Adobe InDesign documents (and probably many other proprietary formats), but I expect them to not be cheap.

Flash / Silverlight requires plugins, and some of them are considered dying technology, although I am sure it is in dispute. Canvas is β€œvery HTML5” and is essentially a bitmap created / rendered on the client, but if you ultimatized the rendering in PDF, it may not provide the required resolution. The same limitation affects the creation of the server side of the image - you will probably have to deal with vector elements and bitmap images, and not display everything in pixels along the way.

This leaves the SVG in my list, either on the client (see RaphaelJS) or on the server (see Inkscape). I am doing some work with server side SVG rendering at the moment, and this is promising; although it’s more scalable than the client, it doesn’t suffer from browser compatibility issues or browser rendering restrictions.

The biggest problem with rendering SVG in the browser is the flow of paragraph text and text in / in the path - I'm not sure how well they are implemented in modern browsers or how much they fit between them. This is especially true when some of them require SVG1.2, and browsers (afaik) have been installing on SVG1.1 for many years. But, if you just want to make standard blocks of text, bitmaps and vector elements, a browser-based SVG should suit your needs.

The example you provided uses server-side technology (SVG, or perhaps a commercial format) and displays low-resolution PNGs on the client.

In your case, once you have considered how to do the editing, you need to think about how to make the PDF, which will be done on the server. You can go at a lower level and use something like FPDF, use report rendering like Jasper, or use a graphics system like GhostScript, Inkscape, Scribus, ps2pdf, svg2pdf, etc.

In addition: I usually do not answer questions without obvious preliminary research. But since you indicated that you really will do this, I am happy to help you get started.

+2
source

Source: https://habr.com/ru/post/1492515/


All Articles