Hello Guys,
Simlple problem and I am hoping for a simple solution!
My software saves all my randomly generated product keys to a text file. It saves this using the code below.

 My.Computer.FileSystem.WriteAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\TempValuesForAKG.txt", PTB.Text, True)

That works fine. I then try to use the Print Document control and display it with the Print Preview Dialog and it does indeed display the data, I am using the code below.

  e.Graphics.DrawString(My.Computer.FileSystem.ReadAllText(My.Computer.FileSystem.SpecialDirectories.MyDocuments & "\TempValuesForAKG.txt"), Font, Brushes.Black, 50, 50)

That is in the PrintDocument_PrintPage part and it works - the data is displayed. However, if the document is too long it doesn't go onto multiple pages. How can I get it to do this?
Sorry for a drawn out question but I thought some of the information might be relevant!
Cheers guys,
Luke

The example on this page shows how to print multiple pages.

Follow this tutorial in vb.net forum of Daniweb, which can give you a proper way of thinking.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.