N fichiers HTML -> 1 PDF

Bonjour,
avec un wget -r -nd --level=1 http://www.w3.org/Protocols/rfc2616/rfc2616.html
je me retrouve avec 22 pages html que je voudrais fusionner puis transformer en un PDF conservant les liens hypertextes (d’où le titre peu clair désolé)
Y a-t-il qqchose dans les paquets de squeeze ?

Ma première réaction serait Ghostscript, mais je suis pas certain qu’avec lui tu puisses conserver des liens cliquables dans ton PDF (car la conversion passe par du Postscript entre les deux). À essayer ?

convert *.html toto.pdf

mais il peut y avoir des soucis de syntaxe. Pense à avoir html2ps

il y a un site avec les RFCs en un seul morceau html :slightly_smiling:

tools.ietf.org/rfc/index

reste plus qu’à convertir en PDF

convert m’a donné un pdf dans lequel il manque des pages suite à des erreurs :

Error: /syntaxerror in (\(Table\(\)1 Sl\(\)WB 0 Sn\(\) 15 70 PR\(Network Working Group R. Fielding Request for Comments:\) S ) Operand stack: --nostringval-- 11.0 -101.05 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1160/1684(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)-- --dict:464/2000(L)-- Current allocation mode is local Last OS error: 2 Current file position is 50028 GPL Ghostscript 8.71: Unrecoverable error, exit code 1 Error: /syntaxerror in (\(Table\(\)1 Sl\(\)WB 0 Sn\(\) 15 70 PR\(Network Working Group R. Fielding Request for Comments:\) S ) Operand stack: --nostringval-- 11.0 -101.05 Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop 1755 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- Dictionary stack: --dict:1160/1684(ro)(G)-- --dict:0/20(G)-- --dict:72/200(L)-- --dict:464/2000(L)-- Current allocation mode is local Last OS error: 2 Current file position is 50028 GPL Ghostscript 8.71: Unrecoverable error, exit code 1 convert: Échec délégation Postscript `/tmp/magick-XXZmOSo3': o3Jy.cache @ error/ps.c/ReadPSImage/766.
la qualité est pas top :


et les liens ne sont plus actifs.

[quote=“agentsteel”]il y a un site avec les RFCs en un seul morceau html :slightly_smiling:

tools.ietf.org/rfc/index

wget --convert-links http://tools.ietf.org/rfcmarkup?doc=2616 -O rfc2616.html

reste plus qu’à convertir en PDF[/quote]

j’avais pas vu ton post, j’envoie ce lien à pdfcrowd.com/

merci pour vos réponses. :023

sinon, toujours avec Debian, essayer de convertir avec htmldoc

EDIT : les liens sont bien conservés

Parfait !
les liens sont conservés mais quand je clique dessus, j’ai une erreur :

[code]impossible de lancer l’application externe

Erreur de l’interrogation du fichier « /home/eric/Bureau/#sec13.5.2 » : Aucun fichier ou dossier de ce type
[/code]

avec htmldoc?

Chez moi ça fonctionne (avec un fichier html unique) :033

mais j’ai fait ça sous Wheezy :wink:

oui, htmldoc. Rapide, efficace. Sous Squeeze …
J’ai dû indiquer le chemin complet. Les deux premières fois, htmldoc a envoyé le pdf qqpart mais je ne l’ai pas trouvé.
Je vais retenter.

edit : non, toujours pas. peut-être la version de pdf produit (1.3) incompatible avec le lecteur (Document Viewer 2.30.3)

L’erreur donne un chemin ne contenant pas le nom du fichier, ça peut pas marcher ?!
Peut-être dû au pages multiples, je vais essayer avec une page html unique.

Oui, avec la page unique ça fonctionne.

et pour toi, les fichiers multiples, ça marche ?

pas encore testé