I am attempting to use the PDF library to export documents from my program, but every time the NewPage() method is called, the program throws an access violation. I attempted to explore the issue using the TMS Memo control and the Memo PDF IO object to export the memo. It throws an access violation as well, which I am willing to bet occurs at the NewPage() method call. I can provide the entire project for the Memo issue, along with the executable I have created, which I have verified throws the access violation on other machines.
//---------------------------------------------------------------------------
#include <fmx.h>
#pragma hdrstop
#include "PDF_main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "FMX.TMSBaseControl"
#pragma link "FMX.TMSCustomComponent"
#pragma link "FMX.TMSMemo"
#pragma link "FMX.TMSMemoPDFIO"
#pragma link "FMX.TMSPDFIO"
#pragma resource "*.fmx"
TForm1 Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (SaveDialog1->Execute()) {
TMSFMXMemoPDFIO1->Save(SaveDialog1->FileName);
}
}
//---------------------------------------------------------------------------