Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / May 2006

Tip: Looking for answers? Try searching our database.

Batch printing application looses document order

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Federico Caselli - 22 May 2006 11:41 GMT
Hi,

I'm writing an application in vb.net 2005 to batch-print several .pdf file
to the default printer, using Process.Start method, without multithreading.

But the order of the documents queued in the printer is not correct and
every time different. For example, if the application prints, in order
1.pdf
2.pdf
3.pdf
in the printer queue I find
3.pdf
1.pdf
2.pdf
or
2.pdf
1.pdf
3.pdf
...

How to be sure to keep the right order?

Thanks.
Marc Gravell - 22 May 2006 11:52 GMT
Perhaps the process you are starting is contrubuting to this, by doing it's
own forwarding and threading...

Anyways, one approach would be to stitch the pdfs into one before printing
(the first google I found was PDFtoolkit (by gnostice), but bound to be
others) - but this might take a lot of space / memory. Also perhaps look at
what is actually doing the printing; is this your code? Perhaps another
product might offer synchronous printing? (looks like PDFtoolkit also does
printing - no idea whether it is any good)

That's my £0.02, anyways,

Marc
William Stacey [MVP] - 22 May 2006 14:07 GMT
Wait for process exit on each process at the bottom of the loop.  It is
using multi-threading as your using multiple processes - so the last
document you start could be finished before the first document.

Signature

William Stacey [MVP]

| Hi,
|
[quoted text clipped - 19 lines]
|
| Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.