export HTML to DOCX with Docx4j - docx4j

I need to generate a DOCX from Webpage (with Images). Will it be possible for DOCX4J to export the HTML Content to DOCX Format ?
Are there any other libraries which can export HTML Content to DOCX?

The docx4j-ImportXHTML project does what you want.
See the sample code.

Related

how can i export <img> tag in handsontable into .csv file as an image not html?

enter image description here
I want to export my handsontable as CSV file but its render as html. so when its downloaded it shows the HTML over there any help will be appreciated.
Unfortunately, it is impossible to export HTML tags into a CSV file, as they are not supported in this format.

Custom live template does not show up in xhtml JSF file

I am using IntelliJ 2017.2 ultimate edition and I have created a live template to surround text in xhtml (JSF) by a tag and attribute.
#{myvalue}
should become
<h:outputText value="#{myvalue}" />
I created a live template named "swot" applicable to in XML : XML Text.
<h:outputText value="$SELECTION$" />
Unfortunately, it does not show up when I try to surround a selection in a xhtml file. I only get standard live templates.
Update with solution
As the file in which I want to applicate the template is JSF xhtml file, I just had to applicate it to "JSP"
As the file in which I want to applicate the template is JSF xhtml file, I just had to applicate it to "JSP"
Setting the applicability to HTML should solve your issue. Please see below image:

convert html5 svg element to pdf without canvas

I created a svg element with d3.js which contains some elements now i want to export it on button click as pdf. Does someone know how to approach this?
When I draw it in a canvas I only get a blank page.
You can use the cloudformatter scripts to convert d3 svg to pdf. See http://www.cloudformatter.com/css2pdf. There are several different examples there showing svg to pdf from various charting and visualization libraries.
Get their Javascript or link to it, its jQuery so you need jQuery. You can format the <div> containing the D3 generated SVG with on line. Assuming the <div>'s id is "d3donut":
return xepOnline.Formatter.Format('d3donut', {srctype:'svg',render:'download',filename:'d3donut'});
There are several other functions to embed, convert to image format or other print formats.
The d3 specific samples are at http://www.cloudformatter.com/CSS2Pdf.SVGCharts.d3Charts

WinRT RichEditBox content as HTML text

How to get WinRT RichEditBox's content as html string ?
Otherwise I can get the content as RTF string with the following code.
richEditBox.Document.GetText(TextGetOptions.FormatRtf, out temp);
How to convert this RTF string to HTML string in WinRT application?
you should use some differ way.
Here is the link of particular solution

How do I wrap text in DDX

I have dynamic content i'm outputting in a Footer element in a PDF w/ DDX & Coldfusion. Some of the records have long text, and do not automatically wrap, I have placed tags, tried padding/margin, all to no avail.
Any ideas?
It should be easy with <cfdocument format="PDF">. Maybe have org.pdf converted into an image using the make thumbnail action, then use cfdocument and HTML to style the footer? Not most efficient, but easiest.