WYSISYG PDF Creator - java

I want to allow users to create a PDF file with an online WYSISYG editor . It will be basically images and text that they can drop and create PDF.I will create a UI using jquery-ui .
I came across Flying Saucer that seems to be a good solution.But is there any other way or existing open source project ?

You could use a combination of an wysiwyg editor and html2pdf

Related

How to drag and open file in editor?

I have a editor developed which opens the xml file and display it there (with the proper structure), for this I need to browse through all the times to select target file, in what way I can add dragging in file feature enable for this ?
The report editor is developed with Java SWT components.
I want to know the possible ways or API available for "dragging in" file ?
This link might help you.
DragSource class which provides the drag and drip API in SWT.
http://www.java2s.com/Tutorial/Java/0280__SWT/DraggingandDropping.htm

How to generate the PDF in CQ5.6.1 using page content in cq5

How to generate the PDF in CQ5.6.1 using page content.
A button in my site (genarate PDF) on click of the button i have to genarate the PDF file using the same page content.
Please let me know is there any out of the box PDF genarator in CQ or do i need to get the any linsenced product to genarate the PDF.
Thanks..
Adobe CQ is integrated with the Apache FOP, a formatter able to create PDF files. This tutorial describes how to enable content rewriter providing PDF version of the content under the .pdf extension.
However, please keep in mind that this approach requires manually writing the XSLT transform file able to process your page (and every component on it) and output the XSL-FO document.
In a previous project (CQ 5.5) we used https://code.google.com/p/wkhtmltopdf/ to create PDF files.. worked pretty good!
I had used Phantomjs to create a a custom pdf from the cq5 pages. for example if you don not want to display the right trail in the pdf or you want to disable the header footer. all this can be achieved with the help of phantomjs.
create a servlet which will execute a command at your server.
phantomjs <custom.js> 'page_url' nameofthepdf.pdf
here custom.js will show or hide html content based on your need.
This will work for all pages irrespective of cq5 or any tool.

Use all word functionalities in jsp

I want to create my jsp page which contains word like functionality where user can add text, save them, do track change function. change fonts and color. Is there any plugin or java script plugin available to implement this kind of functionality in project.?
you can use CKEditor for the same.
CKEditor will give you all the functionality like word file.
CKEditor.com
use tinyMCE (http://www.tinymce.com/)
to display word-like editor.
sample: http://www.tinymce.com/tryit/basic.php
Use tinymce which is a javascript plugin that does text wysiwyg editing

how to convert a HTML web page into a PDF file using Java

i've been searching on the internet on how to convert a HTML page into a PDF file using Java. i found a lot of pointers, and in short, they don't work or are too difficult to implement. i also downloaded a commercial product, pdf4ml; the API is something i'd be happy to work with, except that when i crawled a simple page on wikipedia, i get a out of memory error (setting Xmx to 1024 M). in some approaches, they suggest converting HTML -> XHTML -> FO -> PDF. however, i am getting a lot of exceptions for the XHTML-to-FO XLS file; and reading the documentations, it's not something that i have enough time to understand right now.
here are my questions/concerns.
1. is there another cohesive API out there that will easily convert HTML to PDF (commercial or not)?
2. is there a way i can simply capture a HTML page and store it as a single file. this approach would be similar to using internet explorer's way of saving a web page as a web archive (single file, MHT format)?
any help is appreciated. (btw, i know this question has been asked repeatedly, but in addition to the original spirit of the question, i'm opened to other ways). thanks.
Try wkhtmltopdf, which is using WebKit. Another option (I'm using that currently) is using OpenOffice (remote controlled via macros).
you may use iText open source Java lib for that, and read this
or use YaHPConverter open source Java lib.
or do this whith help of icepdf popular open source lib
or use pd4ml, but it not free, only trial.
or use this, and this is man for it.
My 2 cents using opensource tools:
You can use either Capture screenshots with Selenium or WebDriver to save html page's screenshot in an image file from your Java code. And once you have image file you can convert it to pdf again from your Java code.
EDIT:
It seems you can do all that in 1 step using itext Html to Pdf
I am not sure but you could Try
1) cobra html rendering engine http://lobobrowser.org/cobra.jsp
2) htmleditorkit -- part of jdk
3) JWebPane
Use the rendering kit to parse and render html. The rendered out put is a swing component. Swing component can be used by itext to generate pdf file out put
You can try out Pdfcrowd. It is an easy to use commercial online API with many options and with support for Java.
It can create PDF either from web pages or raw HTML code.

Displaying PDF document in a Java(SE) Standalone Application

Am working on a Java application that requires me to display PDF documents within the application. Am not sure if Java currently supports this or will i need to get a Java library to get this done.
Please, i need advise on how to go about this.
Thanks in advance.
See pdf-renderer
The PDF Renderer is just what the name implies: an open source, all Java library which renders PDF documents to the screen using Java2D.

Categories