Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2592 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  [java] convertir .pdf >> .html et .doc >> .html

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[java] convertir .pdf >> .html et .doc >> .html

n°1355569
Profil sup​primé
Posté le 27-04-2006 à 22:58:38  answer
 

hello  :hello:
 
je cherche de quoi convertir differents formats (.pdf principalement, mais aussi .chm, et .doc) en html si possible(histoire de conserver la mise en page (titre surtout)), au pire txt si possible une librairie, sinon au moins en ligne de commande, histoire de pouvoir automatiser.
 
PDF
aucun topic n'en parle ici (recherche a pdf ds java)
http://forum.hardware.fr/forum1.ph [...] deration=0
 
certains oui, mais ds l'autre sens: ie xxx >> .pdf comme jpedale.
Itext y arrive, mais perd la mise en forme, etxtrait:

Citation :

 You can't 'parse' an existing PDF file using iText, you can only 'read' it page per page.
What does this mean?
The pdf format is just a canvas where text and graphics are placed without any structure information. As such there aren't any 'iText-objects' in a PDF file. In each page there will probably be a number of 'Strings', but you can't reconstruct a phrase or a paragraph using these strings. There are probably a number of lines drawn, but you can't retrieve a Table-object based on these lines. In short: parsing the content of a PDF-file is NOT POSSIBLE with iText


 
maintenant, si ya des outils pr parser directement du pdf en java, je prend aussi  [:aras qui rit] (ya ca en c#, pourtquoi pas hein ;))
 
 
doc en pdf et chm (meme si ca devrait etre plus simple, vu que c'est du html compressé) en html, je prend aussi :)
 
merci :jap:


Message édité par Profil supprimé le 10-09-2006 à 14:07:48
mood
Publicité
Posté le 27-04-2006 à 22:58:38  profilanswer
 

n°1423536
titeade
Posté le 10-08-2006 à 11:55:45  profilanswer
 

essaie de chercher si FOP le fait !!

n°1439703
Profil sup​primé
Posté le 10-09-2006 à 14:07:27  answer
 

titeade a écrit :

essaie de chercher si FOP le fait !!


:jap:
visiblement fop fais le chemin inverse, comme pas mal d'outil que j'ai trouvé
http://xmlgraphics.apache.org/fop/

Citation :

The goals of the Apache FOP project are to deliver an XSL-FO to PDF formatter that is compliant to at least the Basic conformance level described in the W3C Recommendation from 15 October 2001, and that complies with the 11 March 1999 Portable Document Format Specification (Version 1.3) from Adobe Systems.


 
si d'autres idées, je suis toujours prenneur  :)
 
voila qq piste que j'ai trouvé ...
 
en php et totalement bien fait :love: :  
http://search.cpan.org/~antro/PDF-111/PDF/Parse.pm
renvoi un bjet qui entre autres contient:

Citation :

 a title ==> GetInfo ("Title" )
  a subject ==> GetInfo ("Subject" )
  an author ==> GetInfo("Author" )
  a creation date ==> GetInfo("CreationDate" )
  a creator ==> GetInfo("Creator" )
  a producer ==> GetInfo("Producer" )
  a modification date ==> GetInfo("ModDate" )
  some keywords ==> GetInfo("Keywords" )


plus le nb de pages ...
 
 
 
j'ai tout de meme un debut de reponse en java (si jamais d'autres se pose ou se poseront la question ...)
que peut trouver ici
http://www.pdf-tools.com/
niveau code, ca donne un truc assez propre où il suffit d'extraire le contenu et de le lire. je sais pas si Itext etait aussi simple. de toute facon, ca perd tjrs la mise en forme


Message édité par Profil supprimé le 10-09-2006 à 14:51:57

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  [java] convertir .pdf >> .html et .doc >> .html

 

Sujets relatifs
java & xmlconvertir base de donnée excel en base de donnée SQL
comment inserer du code html avec javascript ?HTML <div> flottant
graphe en javaTomcat et internationalisation de fichiers html
besoin d'aide pour naviguation dans page HTMLPassage du HTML au XHTML / CSS, quelque petits soucis...
[RESOLUE] Quelqu'un s'y connait il un peu en tableau HTML ? MerciConvertir des balises HTML en Java pour XML
Plus de sujets relatifs à : [java] convertir .pdf >> .html et .doc >> .html


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR