Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » U++ community news and announcements » Qtf->Pdf simplified
Qtf->Pdf simplified [message #34492] Fri, 25 November 2011 18:17 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Recently I had some minor issues with converting Qtf to Pdf in server environment. Surely, it was not that hard, but I guess dircet support is better. So it inspired two new functions:

Array<Drawing> RenderPages(const RichText& txt, Size pagesize = Size(3968, 6074));

String Pdf(const RichText& txt, Size pagesize = Size(3968, 6074), int margin = 200, bool pdfa = false);


The harder part here is RenderPages, Pdf is then only simply call to PdfDraw package, using RenderPages.

Qtf->Pdf is then just matter of:

#include <RichText/RichText.h>

using namespace Upp;

CONSOLE_APP_MAIN
{
	SaveFile(GetHomeDirFile("test.pdf"), Pdf(ParseQTF("[A9 Hello World!")));
}

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MySql now supports reconnection features
Next Topic: GTK backend
Goto Forum:
  


Current Time: Thu Apr 25 23:47:27 CEST 2024

Total time taken to generate the page: 0.05961 seconds