in

C1 Community

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

Long waiting time when call network printer

Last post 09-05-2008 5:51 PM by C1_Dima. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-29-2008 10:07 PM

    Long waiting time when call network printer

    C1.C1Preview.2.dll -  Version 2.0.20073.42109

    C1.Win.C1Preview.2.dll - Version 2.0.20073.42109

    I have got a problem. When I am using a network printer to be a default printer, when I preview the C1PrintDocument, it need around 1min30sec, but if I set the default printer to be a virtual printer it just need 10 sec. That is a quite big difference, so may I need your help to have a look at this problem, because the time for waiting to preview is not acceptable for my user. Thanks a lot!

     Should you need further information, please feel free to contact me.

     Best Regards,

    Hooda Yeung

  • 01-30-2008 2:36 AM In reply to

    Con's: Long waiting time when call network printer

    It seems wait for the network response, whatever it just use the local printer. After a long time (around 30 - 45 sec - seems timeout), it continue the preview process. After the first time waiting, it become smooth.

  • 02-14-2008 12:36 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 515

    Re: Con's: Long waiting time when call network printer

    There was an enhancement made which might be helpful for you

    * New public static property added to C1PrintDocument:

    static bool C1PrintDocument.UsePrinterForDefaultPageSettings {get;set;}

    Gets or sets the value indicating whether the default page settings are retrieved from the default printer (may slow things down if the printer is a network one) or calculated based on the current locale.

    If you are experiencing slow loading of C1PrintDocument, that may be due to a slow (network) default printer installed in the system. In that case, please set this property to false before creating your C1PrintDocument, along with MeasurementDevice. I.e.:

    C1PrintDocument.UsePrinterForDefaultPageSettings = false;
    C1PrintDocument.MeasurementDevice = MeasurementDeviceEnum.Screen;
    C1PrintDocument doc = new C1PrintDocument();

    Alternatively, if on your system there is a fast local printer along with the slow default network one, you can set the MeasurementPrinterName to the name of that local printer. This will make sure that C1PrintDocument uses that printer both for measurements and for getting the default page settings. I.e.:

    C1PrintDocument.UsePrinterForDefaultPageSettings = true;
    C1PrintDocument.MeasurementDevice = MeasurementDeviceEnum.Printer;
    C1PrintDocument.MeasurementPrinterName = "My local printer name";
    C1PrintDocument doc = new C1PrintDocument();

    Regards,
    Greg

    Filed under: , ,
  • 08-13-2008 4:03 PM In reply to

    • ezbaji
    • Not Ranked
    • Joined on 04-19-2007
    • Posts 8

    Re: Con's: Long waiting time when call network printer

    I couldn't see 'UsePrinterForDefaultPageSettings" and "MeasurementDevice" properties in C1PrintDocument. I tried all versions of Preview DLLs.

  • 09-05-2008 5:51 PM In reply to

    Re: Con's: Long waiting time when call network printer

    Both properties are STATIC, so if you have e.g. code like this:

      C1PrintDocument doc = new C1PrintDocument();

    you should use C1PrintDocument.MeasurementDevice, but NOT doc.MeasurementDevice.

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