PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Convert PDF to HTML format
https://forum.pdfsharp.net/viewtopic.php?f=2&t=454
Page 1 of 1

Author:  gkataria [ Thu Aug 21, 2008 9:23 am ]
Post subject:  Convert PDF to HTML format

How can we convert PDF document to HTML format. Can anyone help me out on this.

Also help required to convert PDF document to .psd format.

Author:  Orestone [ Fri Oct 24, 2008 12:42 pm ]
Post subject:  Render HTML View

I also would like to know whether this is possible. The features page (http://www.pdfsharp.org/PDFsharp/index.php?option=com_content&task=view&id=50&Itemid=1) says, about MigraDoc Lite, that it
Quote:
...Supports different output formats (PDF, Word, HTML, any printer supported by Windows) ...

I have found that MigraDoc is perfect for our application however I also need to be able to render HTML versions for any PDF file that I create. By this I mean an HTML view that loosely follows the PDF layout. I would not expect a item-item match but hopefully an HTML view that is recognisable against the PDF document [/url]

Any suggestions? I cannot find any examples except for the PDFsharpClock ASP example which is really just an embedded PDF in a browser.

Thanks in advance for your help - I am very impressed with the quality of PDFsharp an MigraDoc

Author:  Thomas Hoevel [ Mon Oct 27, 2008 9:49 am ]
Post subject: 

We have four samples online (German only):
http://dev.empira.de/migradocsamples/

There's a drop-down list to select the sample ("Beispiel-Dodokument").

You can flip through the HTML pages (">" and "<") and watch the corresponding PDF file created with MigraDoc ("PDF-Dokument").

Please note: this does not convert PDF to HTML, it only allows to create PDF or HTML from the same MigraDoc document.

Author:  Orestone [ Mon Oct 27, 2008 1:40 pm ]
Post subject: 

Thanks Thomas - those examples seem to be exactly what I am looking for, however it still doesn't help me understand how to achieve that functionality.

Is there a project that I can download with the source for those examples? I cannot find anthing of relevance in the MigraDoc and PDFsharp examples.

Author:  Thomas Hoevel [ Mon Oct 27, 2008 2:45 pm ]
Post subject: 

You wrote:
Quote:
...Supports different output formats (PDF, Word, HTML, any printer supported by Windows) ...

That's what the homepage says since 2006.
Now that we talk about it I'm not sure if HTML is really implemented in MigraDoc Lite ...

It was implemented with MigraDoc 1.1 (but that's a completely different C++ project).

How to get HTML files?
You can install the MigraDoc Client (link below). It requires .NET Framework 1.1 which is available from Microsoft.
You can then use MigraDoc Lite to create your document and save it as an MDDDL file:
Code:
string strDirectory = Path.GetDirectoryName(pdfFilename);
DdlWriter dw = new DdlWriter(Path.Combine(strDirectory, @"nqbpdf.mdddl"));
dw.WriteDocument(document);
dw.Close();

You can then use the MigraDoc Tool (MDT.EXE) to convert this MDDDL file to HTML (mdt.exe /x:html /view /fd:"%1").
Or double click the MDDDL file and in the preview window press Ctrl+H to create the HTML version.
Or right click the MDDDL file and select HTML from the menu.

MigraDoc Client 1.1:
http://migradoc.empira.de/migradoc/Defa ... D=DlClient
This client is not freeware, but it's free for private/non-commercial use.

Here are the samples (but I'm afraid they are of limited use):
http://migradoc.empira.de/migradoc/Down ... e.Rechnung
http://migradoc.empira.de/migradoc/Down ... verwaltung
http://migradoc.empira.de/migradoc/Down ... Broschuere
http://migradoc.empira.de/migradoc/Down ... nAndShapes

http://migradoc.empira.de/migradoc/Down ... SampleCode

Here's the MigraDoc Designer 1.1 (it requires Microsoft Visual Studio .NET 2003):
http://migradoc.empira.de/migradoc/Down ... c.Designer

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/