TPrintPreview: Supply the page EMF files directly?
In my application I'm displaying a few special pages first, then I have 6 EMF files that represent replacement manual pages to be printed (they're print images of printouts from Word captured as EMF files). The 6 EMF files total about 500 KB. Currently I am simply using PaintGraphicEx() to paint the existing EMF files onto the canvas for each page. This works but is rather slow (about 2 seconds per page) and has HUGE memory requirements (the temp file created is over 100 MB and the process memory is almost as big).
I'm wondering if it's possible to somehow stuff the existing EMF files into TPrintPreview without reprocessing them? Since I know how big the EMF files need to be I assume its the act of painting them onto the canvas that converts them to simple bitmaps and consuming all the memory.
In a quick look at the code, it appears that if I expose the TPrintPreview.FPages as a property that I could then use the .Add() method to add metafiles directly. Is there a better way to do this that doesn't require changing the source? Are there any problems I'll encounter by doing this?
Thanks for any suggestions!
I'm wondering if it's possible to somehow stuff the existing EMF files into TPrintPreview without reprocessing them? Since I know how big the EMF files need to be I assume its the act of painting them onto the canvas that converts them to simple bitmaps and consuming all the memory.
In a quick look at the code, it appears that if I expose the TPrintPreview.FPages as a property that I could then use the .Add() method to add metafiles directly. Is there a better way to do this that doesn't require changing the source? Are there any problems I'll encounter by doing this?
Thanks for any suggestions!