hi i don't find a sub forum for printing so i decided to post it here.
I am using Infragistics4.Win.UltraWinPrintPreviewDialog.v12.2 and having the following 2 questions
1. I have a list of print documents to be put together on the fly and show in the print preview dialog. i used the following to set print content
printDocument.RichTextBox.Rtf = sRtf;
the problem is it can only preview one at a time. I need something like this, i have 2 print documents. doc1 has 2 pages and doc2 has 3 pages. the print preview should show a total of 5 pages with first 2 show doc1 and last 3 show doc2. How can i do it?
2. i used the following to print the current page in the footer.
printDocument.Footer.TextCenter = "[Page #]";
it works but i am wondering of it's possible to display something like "[Page # of ?]" with the question mark being the total number of pages.
Hello ,
In order to complete your point 1. Of your requirements you will need to merge/combine your PrintDocument objects in order to be able to show them on a single PrintPreview. On the following link you could see simple tutorial of how you could do this:
http://www.csharp-examples.net/combine-multiple-printdocuments/
About your second question, since print page are generated on demand (this means that they are not pre-created ) you can’t know how many pages there will be.
Please let me know if you have any further questions.
hi Hristo, thanks for the reply.
We used to use DevExpress and they had such syntax [Page # of Pages #] and were able to give for example Page 1 of 6, 2 of 6 etc. so I wondered Infragistics can do the same. I am not talking about generating on demand here, just one single print document that has multiple pages. there's no way to show "Page 1 of 6"?
anyways I applied the code and it seems working, i can print each doc on a new page now.
but the problem is again the page count, at least the page number should be provided sequentially. Right now page one shows "Page 1" and page two again shows "Page 1". so in Infragistics there's no way to do it?
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this matter?
Thank you for using Infragistics Components.