Printing issues when specifying page range

Apr 23, 2012 at 1:50 PM

Hi there,

I'm having problems printing page ranges from the document viewer.

Once my xps document has loaded I can successfully print all pages or even apply a page range such as '1-12' without any issues. However if I specify a range such as '10-12' then the print fails. I've tested this for numerous xps documents with the same results.

Using the 'Custom Annotations' sample from your online samples (http://firstfloorsoftware.com/liveapps/DocumentToolkit2/#/SampleAnnotations) I have experienced the same issue. If I print pages '10-12' it produces a 'Maximum retry count exceeded' error. I'm guessing this is caused due to the pages not having been loaded in the control? 

Any help would be appreciated.

Colin.

 

Coordinator
Apr 23, 2012 at 8:15 PM

Hi Colin,

There is a known issue where Document Toolkit doesn't correctly print the pages when specifying a print range in the print dialog. The problem is unfortunately not easy to fix.

Also, this error occurs when the DocumentPrinter control is not added to the visual tree. See also http://documenttoolkit.codeplex.com/discussions/263807

Kind regards,

- Koen

Apr 25, 2012 at 12:52 PM

Hi Kozw,

Is there any plans to rectify the page range issue, unfortunately I'm having to restrict users to printing one page at a time for the moment.

If there is a solution in the works I would appreciate notifcation of it so we can plan accordingly.

Colin.

 

Coordinator
Apr 25, 2012 at 2:10 PM
Edited Apr 25, 2012 at 2:10 PM

Hi Colin,

There is an alternative that is suitable to your scenario; implement a page filter and assign it to DocumentPrinter.PageFilter. A page filter limits the pages that are outputted based on a custom algorithm. IPageFilter is the interface to implement. A custom page filter implementation is available in the source code (http://documenttoolkit.codeplex.com/SourceControl/changeset/view/88046#2117427). The sample page filtering uses this filter (http://documenttoolkit.codeplex.com/SourceControl/changeset/view/88046#2117465).

- Koen