View Issue Details

IDProjectCategoryView StatusLast Update
0005239JEDI VCL00 JVCL Componentspublic2011-06-10 16:10
ReporterdzomlijaAssigned ToAHUser 
Status resolvedResolutionfixed 
Product Version3.39 
Target VersionFixed in Version3.40 
Summary0005239: TJvPreviewControl will not accept the creation of more than one page
DescriptionI 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 InformationThe 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.
TagsNo tags attached.


2010-05-14 13:49


TJvPreviewControl - Single Pages (678,317 bytes)


2010-05-14 20:01

developer   ~0017388

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
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