Convertir un fichier XML en PDF

jediNoobiewan Messages postés 67 Date d'inscription mardi 25 janvier 2005 Statut Membre Dernière intervention 20 octobre 2010 - 26 oct. 2005 à 17:13
cs_tatitati Messages postés 3 Date d'inscription mercredi 16 avril 2008 Statut Membre Dernière intervention 5 février 2010 - 10 janv. 2010 à 16:54
Bonjour à tous,

Je souhaite convertir un XML en PDF, je sais qu'il faut un fichier DTD
(j'utilise docbook), un fichier XSL et un utilitaire pour faire le
passge, si quelqu'un est calé, peut-il me donner une marche à suivre
svp @++

2 réponses

phenX Messages postés 704 Date d'inscription mercredi 4 mai 2005 Statut Membre Dernière intervention 28 août 2012
31 oct. 2005 à 09:53
moi je fait un copier coller dans un Word et j'utilise PDFCreator...mais bob c'est peut être pas ce que tu veut?
0
cs_tatitati Messages postés 3 Date d'inscription mercredi 16 avril 2008 Statut Membre Dernière intervention 5 février 2010
10 janv. 2010 à 16:54
salut voila une demarche a suivre (sauf moi j utilise une image) :

string fileName = location + "/clientOk.pdf";
Image imageFile = null;
Document clientOkPdf = new Document();
PdfWriter.GetInstance(clientOkPdf, new System.IO.FileStream(fileName, System.IO.FileMode.Create));
clientOkPdf.AddTitle("Client Ok");
clientOkPdf.Open();
try
{
foreach (string imgFile in Directory.GetFiles(location + "/p.jpg"))
{
imageFile = Image.GetInstance(imgFile);
imageFile.Alignment = Image.MIDDLE_ALIGN;
imageFile.ScalePercent(80);
clientOkPdf.Add(imageFile);
clientOkPdf.NewPage();
imageFile = null;
}
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}
//finally
//{
// clientOkPdf.Close();
//}
0
Rejoignez-nous