Trint,
Please copy your entire (new) pd_PrintPage() method here so that I can
see it. The error you are getting indicates that you are missing a
"break" statement in your "switch" somewhere. I need to see the whole
method in order to find the problem.
Plus, I may have to
leave the "pd_PrintPage" as it originally was because it is already
handling the "if the emf memory stream document (the invoice) has
multiple pages (not copies).
If you followed my instructions carefully, you will find that the new
pd_PrintPage handles multiple copies and multiple pages correctly. Read
my posts again: remember that I said that pd_PrintPage would be called
for:
pd_PrintPage: m_currentPrintingPage 1, copy 1
pd_PrintPage: m_currentPrintingPage 1, copy 2
pd_PrintPage: m_currentPrintingPage 1, copy 3
pd_PrintPage: m_currentPrintingPage 2, copy 1
pd_PrintPage: m_currentPrintingPage 2, copy 2
pd_PrintPage: m_currentPrintingPage 2, copy 3
etc.
If someone is telling you that this new design will print only three
copies for a single invoice, and not print the other pages, then they
are quite simply mistaken. If you want the pages to print in a
different order, then that can be arranged, too.
It is not possible to combine multiple PrintDocuments into one print
job. Can't be done. However, take heart. pd_PrintPage can once again be
adjusted to print multiple documents, each with multiple pages, in
multiple copies. You just need to decide upon the order in which you
want things printed. That is, do you want printing by the document,
then by the page, then by the copy:
Document 1, page 1, copy 1
Document 1, page 1, copy 2
Document 1, page 1, copy 3
Document 1, page 2, copy 1
Document 1, page 2, copy 2
Document 1, page 2, copy 3
Document 2, page 1, copy 1
Document 2, page 1, copy 2
Document 2, page 1, copy 3
etc.
or do you want printing by the document, by the copy, then by the page?
Document 1, page 1, copy 1
Document 1, page 2, copy 1
Document 1, page 1, copy 2
Document 1, page 2, copy 2
Document 1, page 1, copy 3
Document 1, page 1, copy 3
Document 2, page 1, copy 1
Document 2, page 1, copy 2
Document 2, page 1, copy 3
etc.
In other words, for each document, do you want the first page white,
then yellow, then pink, then the next page white, then yellow, then
pink, or do you want the entire document (all pages) printed on white
paper, then the entire document again on yellow paper, then the entire
document again on pink paper, then start the next document?
Finally, as for the pink copy not having the price on it, I will have
to find the post where you posted your code again, but that should be a
relatively easy adjustment. I will post a suggestion shortly.