Convert PDF to HTML in ios? - html

To Do : Convert pdf file to HTML file
For Eg: The pdf file in link below
http://www.inkwelleditorial.com/pdfSample.pdf
should be converted to HTML file.
Study : I googled and found out few ways to convert HTML to PDF like
Convert html file to PDF Document in iOS using Cocoa-Touch
Creating a PDF with iOS
Generating PDF Content
but could not get any way to do vice versa ie convert pdf to HTML.
Is there any library available in objective C for above purpose?

sorry, I dont think there is a reliable way to keep the formatting (and neither for get all text.)
you'd be better off to display and search the pdf using pspdfkit

Related

How can I do a preview of some HTML part of my code as PDF or DOCX file in Angular

I have some data that I should present on a container like if it is a PDF or DOCX file with separated pages. But I don't have PDF or DOCX at the moment. I have HTML code and in some div at the same page I should add such kind of preview so user could see how it will be exported to PDF or DOCX file. I searched a lot but didn't find any solution yet. I tried with embed and iframe but it requires data different from simple HTML code. How can I achieve simple HTML code be previewed as PDF or DOCX? I'm using Angular 9 on my project.

embed a pdf archive like it were part of the html code

i had a little question, i want to embed a pdf like it were part of the website, i could rewrite the pdf in html but it will be a lot of work, what would be the best looking option to embed it?
The pdf has pictures and letters with fonts and columns.
Thanks.
I would go with one of the two approaches. One is a native rendering of the PDF content in a DOM node, using PDF.js. It is an open source library that's used as the default PDF viewer in Firefox.
Another way is to emulate the look by converting the PDF pages to images when the PDF is uploaded. You may use imagemagick to parse the pages, and display the content in a slideshow/gallery widget.

JSP/HTML/CSS to PDF generation

Basically a simple question:
In php you have mpdf/tcpdf etc libraries that convert your HTML/CSS as is into a pdf file.
I have now a JSP page from where i open up a popup JSP including kind of a organizational chart with divs created from HTML/CSS. Is it possible that i can just take this whole popup and convert it somehow into a pdf file -> in chrome you have the option of save as pdf -- and that works it creates a pdf file successfully ! But i want the website to create a pdf itself without browser plugin. Is it possible? Does Java/JSP have such an option to convert pure HTML/CSS to pdf?
You could use Wkhtmltopdf to convert from HTML to PDF. https://code.google.com/p/wkhtmltopdf/

HTML to PDF convertion and editing in iOS

I am creating an iPad application for reading PDF, this PDF should be generated from a HTML file. I have seen some sample codes for converting HTML to PDF, and I think that part will be fine for me to implement.
I have seen some apps from from AppStore for reading PDF files, in that there is an option for increase the font size (not zooming), color style etc. When we increase the font size the text content automatically wrapping to next line. How can I implement this in my app? Any idea about how would they have done that?
I have seen in some posts that, it is not possible to edit a PDF file, so are they actually using PDF file or some other format?
When rendering your PDF to show it to user, you can convert it in other formats like HTML and then allow user to change font-size, font-style. So your PDF remain unchanged. Also it is easy to manipulate HTML than binary formatted documents like PDF.

Using IcePDF or PDFBox to generate HTML page from PDF

I want to use IcePDF or PDFBox to extract content from PDF. But I don't now the way to continue generating HTML web pages from the text and images extracted.
You can convert pdf to html with PDFBox. Try this link.
By adding -html as parameter when you extract text, you will get html of the pdf. But it will not contain any image, graphics and other details. It will be only the text extracted from the pdf in html format.
If you want to create the exact look and feel of the pdf, there is no single step method in PDFBox. In my knowledge no library provides this facility to create exact html of the pdf. But using PDFBox you can extract images, text and its details. Using these details you have to create a logic to produce the html. We have done a project to convert pdf to html for azzist.com. We have accomplished the conversion using PDFBox. In azzist we are converting the resume to html format. (Still some font issues are there).
Scribd, google, dropbox, zoho etc have accomplished this conversion in a better way. You can have a look at any of these sites to check how they have accomplished this. (You will not get the logic. You have to find it out).