I'm not entirely sure of the nature of this question BUT I do have some code that prints both Text and Images without generating a file other than a run-time generated Barcode image in a stream. But no files physically on the hard-drive.
Public Sub PrinterDocument_PrintPage(ByVal sender As Object, ByVal e As Printing.PrintPageEventArgs) Handles PrinterDocument.PrintPage
e.Graphics.CompositingMode = Drawing2D.CompositingMode.SourceCopy
e.Graphics.CompositingQuality = Drawing2D.CompositingQuality.AssumeLinear
e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.None
e.Graphics.TextRenderingHint = Drawing.Text.TextRenderingHint.SingleBitPerPixel
e.Graphics.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic
Dim barcodetext As String = MyBarCode.Value
Dim barcodecaption As String = MyBarCode.Caption
Dim captionfont As Font = New Font("Arial", 6.0F, FontStyle.Regular)
PrinterText = barcodecaption
PrinterFont = New Font("Arial", 8.0F, FontStyle.Regular)
PrinterBrush = New SolidBrush(Color.Black)
XPosition = 100.0F
YPosition = 100.0F
e.Graphics.PageUnit = GraphicsUnit.Document
e.Graphics.DrawImageUnscaled(MyBarCode.GenerateBarcode(), New Point(60, 22))
e.Graphics.DrawString(barcodecaption, captionfont, PrinterBrush, 140.0F, 72.0F)
e.Graphics.DrawString(PrinterText, PrinterFont, PrinterBrush, XPosition, YPosition)
e.HasMorePages = False
End Sub
Additionally the GenerateBarcode Method is defined as....
Private Function GenerateBarcode(ByVal text As String) As Bitmap
Dim ret As Bitmap
Dim barcode39 As Barcode3of9 = New Barcode3of9()
Dim barcodefont As Font = barcode39.GetBarcodeFont(BarcodeType.Barcode3of9Regular, 29.0F)
Dim barcodesize As Size
barcodesize = TextRenderer.MeasureText(text, barcodefont)
BarcodeLabel = New Label()
BarcodeLabel.UseCompatibleTextRendering = True
BarcodeLabel.BackColor = Color.White
BarcodeLabel.Font = barcodefont
BarcodeLabel.Width = barcodesize.Width + 20
BarcodeLabel.Text = text
BarcodeLabel.Height = 16
ret = New Bitmap(BarcodeLabel.Width, BarcodeLabel.Height)
BarcodeLabel.DrawToBitmap(ret, New Rectangle(0, 0, BarcodeLabel.Width, BarcodeLabel.Height))
Return ret
End Function
Hope this helps,
-ArtificerGM