in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Print preview and page range on multple sub-documents

Last post 05-21-2008 10:20 AM by C1_Dima. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-12-2008 11:22 AM

    Print preview and page range on multple sub-documents

    I have a situation where I have mutiple page re-numberings within on printdocument.

    I would like to be able to print any page within the set of pages that are present but the dialog only shows the first page range so if I chose to pick a page range I am limited to the first set of pages.

    For example.  I have pages 1-4, 1-2, 1-3 and 1.  I want to print the 2nd page of the second set of pages (page 6 of entire document) but cannot get this to work.

    Any ideas?

     Thanks in advance!

  • 05-21-2008 10:20 AM In reply to

    Re: Print preview and page range on multple sub-documents

    Printing a single page in this case should be possible by selecting the page in the "Pages" (thumbnails) view, and selecting "print selection" in the print dialog. BUT, unfortunately, there seems to be a bug and this does not work correctly (a page from the first set is printed). I will try to fix this and make the fix available within a week or two.

    Other than that, you can of course make your own "print current page" handler, and print the page by taking its metafile and sending it to the print manager, somehow like this:

    C1PrintDocument doc = new C1PrintDocument();
    // fill the document....
    ...
    C1PrintPreviewControl pview = new C1PrintPreviewControl();
    pview.Document = doc;
    ...
    // make a document of the current page:
    List<Metafile> doc1 = new List<Metafile>();
    doc1.Add(doc.Pages[pview.PreviewPane.StartPageIdx].AsMetafile());
    // print it:
    C1PrintManager pm = new C1PrintManager();
    pm.Document = doc1;
    pm.Print(new System.Drawing.Printing.PrinterSettings());

    Hope this helps somewhat.

    Cheers,
    Dima.
Page 1 of 1 (2 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.