wxPdfDocument SetAutoPageBreak Not Working
Posted: Sat Aug 18, 2018 8:42 pm
Hello,
I am trying to figure out the SetAutoPageBreak but it seems that I am not using it properly. Even though the loop goes to 250, the pdf document is only one page
Can someone please tell me what I am doing wrong.
Thanks in advance
I am trying to figure out the SetAutoPageBreak but it seems that I am not using it properly. Even though the loop goes to 250, the pdf document is only one page
Code: Select all
wxPdfDocument m_pdfDoc;
wxPdfFontManager::GetFontManager()->AddSearchPath(wxT("/usr/share/fonts"));
m_pdfDoc.SetAutoPageBreak(true,10); // I tried this commented and uncommented but the behavior is the same.
m_pdfDoc.AddPage(wxPORTRAIT, wxPAPER_A4);
m_pdfDoc.SetFont(wxT("Helvetica"), wxPDF_FONTSTYLE_REGULAR, 12);
for(int j=0; j < 250; j++)
{
m_pdfDoc.Text(10, 5*j, "test " + SSTR(j));
}
Thanks in advance