RTF naar PHP

Pagina: 1
Acties:

  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
Heeft iemand misschien een idee hoe een RTF bestand te converteren naar HTML? Ik weet wel van een bestaande class:
http://josefine.ben.tuwien.ac.at/~mfischer/, maar ik wil er graag een zelf maken. Hoe weet ik nu welke codes in RTF wat betekenen???

  • Dennis
  • Registratie: Februari 2001
  • Laatst online: 21:00
Inladen in word -> opslaan als html :?

  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
Sorry, ik moet geen halve vragen stellen...
Hoe kan ik met PHP een RTF bestand naar HTML converteren?

Verwijderd

Daar zijn wel progjes voor. Heb zelf ooit een javaprogje gemaakt dat via DDE Word aanstuurde om word 2k files die waren geupload naar een webserver te converteren naar html. rtf is echter veel makkelijker, gewoon ff zoeken met google.

Verwijderd

Op dinsdag 18 december 2001 14:13 schreef mEdnass het volgende:
Sorry, ik moet geen halve vragen stellen...
Hoe kan ik met PHP een RTF bestand naar HTML converteren?
welk os?

  • roelio
  • Registratie: Februari 2001
  • Niet online

roelio

fruitig, en fris.

moet je ff op msdn.microsoft.com de RTF specificatie zoeken, is echt vrij simpel...

AMD Phenom II X4 // 8 GB DDR2 // SAMSUNG 830 SSD // 840 EVO SSD // Daar is Sinterklaas alweer!!


  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
Op dinsdag 18 december 2001 14:14 schreef fladder het volgende:
[..]
welk os?
Weet niet precies, wat Kennisnet draait. Moet nog FFies kijken. Maar ik heb iig geen acces tot de compu zelf(als dat al iets uitmaakt)

  • drm
  • Registratie: Februari 2001
  • Laatst online: 09-06-2025

drm

f0pc0dert

mEdnass:
Hoe weet ik nu welke codes in RTF wat betekenen???
Rich Text? Volgens mij is daar nog niet zo heel gek lang geleden nog een topic over geweest...
[search=rtf rich text]

edit:
hmmm

Je zou alles wat je wilt maken in RTF eventjes in wordpad kunnen maken, en dan in de "source" van het bestand kijken... Maar als je erg veel wilt is dat misschien te moeilijk...

Music is the pleasure the human mind experiences from counting without being aware that it is counting
~ Gottfried Leibniz


  • mEdnass
  • Registratie: November 2001
  • Laatst online: 04-12-2021
Da's wel een vette URL, thanx
*D

bedoel die van Limoentje...

Verwijderd

Een com+ connectie openen met MsWord, vervolgens via deze connectie het RTF document openen, en laten opslaan als HTML.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* File system variables for testing */
    dir = getDirectoryFromPath(getBaseTemplatePath());
    file = dir & "test.doc";
    target = dir & "test.html";
    
    /* The class of Word's HTML converter.  Note: the numeric value of
     this converter may vary from computer to computer.  We should be able
     to loop through the "wordApp.fileConverters" collection to find a 
     fileConverter with fileConverter.className="HTML", and then use
     fileConverter.saveFormat, but this did not work, since there was no
     fileConverter with className="HTML" found, at least on my machine.  
     For more information, see
        http://support.microsoft.com/support/kb/articles/Q224/0/66.ASP */
    htmlConversionClass = 8;

    /* This will not open Word if running locally */
    WordApp.Visible = FALSE;
    
    /* This returns the 'Documents' collection of the Word object */
    WordDoc = WordApp.Documents;
    
    /* We should open the document as READ-ONLY, but I don't know how.
     The syntax should be:  
        expression.Open(FileName, ConfirmConversions, ReadOnly, ...)
     but I could not get it to work, with either val(TRUE) or val(1) 
     for the flags.  */
    success = WordDoc.Open(file);
    
    /* Just for a shorter command */
    ActiveDoc = WordApp.ActiveDocument;
    
    /* Save as HTML */
    ActiveDoc.SaveAs(target,val(htmlConversionClass));
    
    /* Close the document */
    ActiveDoc.Close();
    
    /* Quit the Word */
    WordApp.Quit();

  • Creepy
  • Registratie: Juni 2001
  • Laatst online: 18:04

Creepy

Tactical Espionage Splatterer

Hmm.. zelf maken is niet zo heel moeilijk. Maar de layout precies hetzelfde krijgen (zeker de Word RTF, wat weer eens niet 100% volgende de standaard is) is een klote zooi!.

Hiero op m'n werk is ook zelf een RTF -> HTML convertor gebouwd (in Delphi, onder gebruik te maken van een richedit o.i.d.). In 90% van de gevallen gaat dit allemaal prima.. maar in de rest van de gevallen komt het helaas niet 100% overeen.

"I had a problem, I solved it with regular expressions. Now I have two problems". That's shows a lack of appreciation for regular expressions: "I know have _star_ problems" --Kevlin Henney


  • elnino
  • Registratie: Augustus 2001
  • Laatst online: 03-09 05:13
Op http://www.wotsit.org/ kun je een heleboel specificaties van bestandstypes, waaronder 2 van RTF.
Pagina: 1