Hi, I to want to convert my html code to pdf file (react). I tried using jspdf and html2canvas, but they convert html>image>pdf, any other solutions? - html

I to want to convert my html code to pdf file (react). I tried using jspdf and html2canvas, but they convert html data to image and then to pdf, is there a way to convert html code in react to pdf where all the content is selectable. I tried multiple ways such as html2psf, phantomjs, etc. Nothing worked.
I also want to store my pdf file in blob data.

Related

Show preview of a file in html in angular 5

I need to preview files of the format pdf or doc. I looked for solutions which included using with the googledocsviewer but the file that I want to preview is present right in the application as a File object. Itried using the with the fileReader.readasDataUrl function and was able to preview txt and image format files, but I need to work with the other formats too.I came across a npm package called file preview https://www.npmjs.com/package/filepreview but I could not understand how to use it. Any suggestions are appreciated.

Best way to include/embed PDF images in slidify presentation (R Markdown)

I'm preparing a presentation in .Rmd (R markdown) file using slidify.
I have some vector graphics saved as PDF files that I would like to render on particular slides.
I've tried methods that I used in raw .Rmd (markdown syntax) as well as those from bookdown. However, none of them works.
As I can see in generated HTML, PDF file location is directly provided in img src and as I understand HTML files do not directly support PDF files.
However, I'm not sure what to do (what is the best approach):
convert PDF (to .svg) and use it in .Rmd?
try to write some raw HTML in my .Rmd fo;e using suggestion from Recommended way to embed PDF in HTML? that will allow me to render PDF,
use different command to embed PDF in presentation (something specific to slidify)?

displying docx file data using html

hi i need to display doc/docs and PDF file in my html page. i tried following tag PDF file is displaying content but doc/docs file is not displaying please help me.

Convert PDF to HTML (Code)

Is there any way to convert a pdf file to HTML code? I founded tools for convert PDF in HTML but all convert PDF in image and insert it into html page. I need to convert PDF in html code for generate dinamic pages.

Converting RTF file having images to HTML

I am using Windows Application to develop my project. There is one case, in which i need to convert RTF file to HTML and printing it. In the RTF file containing images also. In simple i can convert RTF to HTML. But images cant convert. it not there in the HTML file.
So can anyone give some idea regarding same that how can i do convert RTF file data including Images to HTML file?
Thanks in Advance.
In HTML you can embed an image as Base64 encoded. See here, with a data: URL. How the binary bytes can easily be converted to Base64 ASCII I do not know.