Changeset 208 in PSPA


Ignore:
Timestamp:
Dec 19, 2012, 10:22:50 AM (12 years ago)
Author:
garnier
Message:

add pdf creation for test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/src/GWt_pspaApplication.cc

    r203 r208  
    725725
    726726#ifdef HAS_IMAGEMAGIC
    727   Wt::WPdfImage pdfImage("4cm", "3cm");
     727  Wt::WPdfImage pdfImage("30cm", "30cm");
    728728 
    729729  Wt::WPainter p(&pdfImage);
     
    732732  std::ofstream f("chart.pdf", std::ios::out | std::ios::binary);
    733733  pdfImage.write(f);
    734   new WText("<a href='chart.pdf'>Download</a>",toto);
     734  addConsoleMessage("Le fichier <a href='chart.pdf'>chart.pdf</a> a été créé");
    735735#endif
    736736
     
    789789
    790790  chart->resize(300, 300); // WPaintedWidget must be given explicit size
     791
     792#ifdef HAS_IMAGEMAGIC
     793  Wt::WPdfImage pdfImage("30cm", "30cm");
     794 
     795  Wt::WPainter p(&pdfImage);
     796  chart->paint(p);
     797 
     798  std::ofstream f("chart.pdf", std::ios::out | std::ios::binary);
     799  pdfImage.write(f);
     800  addConsoleMessage("Le fichier <a href='chart.pdf'>chart.pdf</a> a été créé");
     801#endif
    791802}
    792803
Note: See TracChangeset for help on using the changeset viewer.