I'm porting some C++ code to VB.NET which creates a print job consisting of several pages. Every page has a template of graphical objects (text, lines, curves, etc) which stays the same on each page, and overlaid on top of that is the different data for each page.
The template is created at the start of the print job as an in-memory metafile using CreateEnhMetaFile
, and at the start of each page this metafile is drawn onto the print device context using PlayEnhMetaFile
.
How can I do this in .NET? From my reading of the API so far, it seems that I can only import a Metafile
from a file or stream, and not create one from scratch. Is this correct?