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 » January 14th, 2019, 10:00 am

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: January 14th, 2019, 9:48 am

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

Postby VPC16 » February 6th, 2019, 8:31 pm

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: August 30th, 2016, 2:26 pm

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

Postby Kambiz » February 10th, 2019, 10:48 am

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: 2430
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Projects

Who is online

Users browsing this forum: No registered users and 2 guests

cron