copy changes from develop

This commit is contained in:
Alex Fabijanic
2018-02-02 12:24:16 -06:00
parent 6fa4fda1e4
commit aaf14a0e93
35 changed files with 2376 additions and 238 deletions

View File

@@ -0,0 +1,38 @@
//
// main.cpp
//
#include "Poco/PDF/XMLTemplate.h"
#include "Poco/Path.h"
#include "Poco/File.h"
#include "Poco/Exception.h"
#if defined(POCO_OS_FAMILY_UNIX)
const std::string pdfFileName = "${POCO_BASE}/PDF/samples/Template/Report.pdf";
const std::string xmlFileName = "${POCO_BASE}/PDF/samples/Template/Template.xml";
#elif defined(POCO_OS_FAMILY_WINDOWS)
const std::string pdfFileName = "%POCO_BASE%/PDF/samples/Template/Report.pdf";
const std::string xmlFileName = "%POCO_BASE%/PDF/samples/Template/Template.xml";
#endif
using Poco::Path;
using Poco::File;
int main(int argc, char** argv)
{
try
{
Poco::PDF::XMLTemplate xmlTemplate(Path::expand(xmlFileName));
xmlTemplate.create(Path::expand(pdfFileName));
}
catch (Poco::Exception& exc)
{
std::cerr << "ERROR: " << exc.displayText() << std::endl;
}
return 0;
}