Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005239 [JEDI VCL] 00 JVCL Components major always 2010-05-14 13:49 2011-06-10 16:10
Reporter dzomlija View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.39
Summary 0005239: TJvPreviewControl will not accept the creation of more than one page
Description I use the OnAddPage event of TJvPreviewControl to render whatever printout I desire, as I believe I'm supposed to. The OnAddPage event includes a boolean parameter "NeedMorePages", which must be set to True should my print require more than on page.

However, if "NeedMorePages" is set to True, an EListError exception occurs - "List Index Out Of Bounds (1)". I have traced the error back to the TJvCustomPreviewControl.DoAddPagemethod, when it calls the OnAddPage event at line 1073 of JvPrvwDoc.pas:

FOnAddPage(Self, PageIndex, ACanvas, APageRect, APrintRect, Result);

I set a breakpoint on line 1073, and code runs perfectly, untill it is time to begin rendering the second page.

I have attached a simple demo program that will highlight this issue. The demo is supposed to simply provide a quick preview of 10 pages, containing "Page : X" on each, counting the pages. However, it cannot get past page 1 to continue rendering the pages.
Additional Information The print preview component as it is implemented in the attached demo project, is part of a printing engine that I am working on that uses PowerPDF to create PDF documents, but allows for the design layout of said PDF documents to be used also as a template for printing, thus allowing me to design a document once, and then call a single line of code to either create a PDF file, or to print to paper.
Tags No tags attached.
Attached Files zip file icon TJvPreviewControl - Single Pages Only.zip [^] (678,317 bytes) 2010-05-14 13:49

- Relationships

-  Notes
(0017388)
AHUser (developer)
2010-05-14 20:01

Fixed in SVN revision: 12768

- Issue History
Date Modified Username Field Change
2010-05-14 13:49 dzomlija New Issue
2010-05-14 13:49 dzomlija File Added: TJvPreviewControl - Single Pages Only.zip
2010-05-14 20:01 AHUser Note Added: 0017388
2010-05-14 20:01 AHUser Status new => resolved
2010-05-14 20:01 AHUser Fixed in Version => Daily / SVN
2010-05-14 20:01 AHUser Resolution open => fixed
2010-05-14 20:01 AHUser Assigned To => AHUser
2011-06-10 16:10 obones Fixed in Version Daily / SVN => 3.40


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker