PrintPreview - TMetafileList storage file size limit (2GB)

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

PrintPreview - TMetafileList storage file size limit (2GB)

Postby mitzix » 14/01/19 10:00

Hi,
I found problem when there's a lot of pages to print. When TMetafileList.Storage temp file exceeds 2GB boundary it is not possible to display or print pages retrieved from this file (not cached). It is due to bad variable types in Delphi Vcl.Graphics.TMetafile methods (e.g. TestEMF) where Size variable is declared as Longint instead of Int64. It can be overriden with class hack but there's bigger problem. It seems that TEnhMetaHeader declared in Windows cannot be used with big files (>2GB) due to its member offDescription declared as DWORD. This type is used in whole TMetafile class. This issue affects all Delphi versions up to Rio.
Only solution I see is to split TMetafileList storage file to multiple parts less than 2GB or save each page in separate file. Can you please fix this issue?
mitzix
Member
Member
 
Posts: 1
Joined: 14/01/19 09:48

Re: PrintPreview - TMetafileList storage file size limit (2G

Postby VPC16 » 06/02/19 20:31

Or have an error flag that the memory has been reached to exit gracefully. Looking at this but this option is not obvious, may need a new Method.
VPC16
Active Member
Active Member
 
Posts: 15
Joined: 30/08/16 14:26

Re: PrintPreview - TMetafileList storage file size limit (2G

Postby Kambiz » 10/02/19 10:48

Hi,

Having a 2GB of preview content is too much.
Would it be better to render only pages that the user view?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: 07/03/03 19:10


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 0 guests