.NET

Reply
*Fredrik Mattsson
Message 1 of 8 (357 Views)

Multi-page plot job?

357 Views, 7 Replies
02-08-2006 04:48 AM
I've tried to create a single plot job that consists of multiple pages. Each
page is a single layer turned on and off in a loop.
To do this using multiple plots is not a problem and if you look at the
Autodesk.AutoCAD.PlottingServices.PlotEngine it looks like you should be
able to do this in a single plot job something like my example. But only the
first page gets printed.

The parameter lastPage in PlotEngine.BeginPage suggests that it should be
able to create a multi-page plot.
Has anyone suceeded with this?

_engine.BeginPlot(null,null);
_engine.BeginDocument(PlotInfo,"Autocad plot", null, 1 ,false,string.Empty);

for(int i = 1; i < pages.Count; i++)
{
ShowPage(pages[i-1]); // set single layer to on and all other to off.

Autodesk.AutoCAD.PlottingServices.PlotPageInfo PageInfo = new
Autodesk.AutoCAD.PlottingServices.PlotPageInfo();
_engine.BeginPage(PageInfo,PlotInfo,(i == pages.Count)
/*lastpage*/,null);

_engine.BeginGenerateGraphics(null);
_engine.EndGenerateGraphics(null);

_engine.EndPage(null);
}

_engine.EndDocument(null);
_engine.EndPlot(null);


Our application has multiple pages in one drawing.
There is two problems with creating one print job for each page:
1. If I create multiple print jobs and send them to a network printer other
users print jobs can sometimes be created inbetween my pages.
2. I annot create a multi-page PDF file in a simple way. (Need to create
postscript files and merege those with distiller afterwards).
Valued Contributor
Posts: 73
Registered: ‎06-03-2004
Message 2 of 8 (357 Views)

Re: Multi-page plot job?

02-16-2006 12:55 PM in reply to: *Fredrik Mattsson
I don't think AutoCAD is capable of sending a multiple page document to a printer as one print job. For both Multi-Sheet DWFs and PDFs we have always had to produce the single files and then merge them (er to a single file. We can't use publish as we are adding data/restoring Layerstates, etc). As for Xerox plotters, we use PJL to create a multi-sheet file that will print as one job. I have tried doing the same for our "B" size Ricohs without any luck.
Contributor
Posts: 17
Registered: ‎10-28-2004
Message 3 of 8 (357 Views)

Re: Multi-page plot job?

03-20-2006 01:15 PM in reply to: *Fredrik Mattsson
How are you merging the dwf's.?
Valued Contributor
Posts: 73
Registered: ‎06-03-2004
Message 4 of 8 (357 Views)

Re: Multi-page plot job?

03-21-2006 03:39 AM in reply to: *Fredrik Mattsson
We took the DWF SDK toolkit that has a merge DWF solution (C++) and modified it for our purposes.
Valued Contributor
Posts: 60
Registered: ‎06-08-2006
Message 5 of 8 (357 Views)

Re: Multi-page plot job?

06-22-2006 12:22 PM in reply to: *Fredrik Mattsson
It is capable with the classes available. Call BeginPage/EndPage (and BeginGenerateGraphics/EndGenerateGraphics) for each page within the surrounding BeginDocument/EndDocument.
Active Contributor
Posts: 38
Registered: ‎10-02-2007
Message 6 of 8 (357 Views)

Re: Multi-page plot job?

10-04-2007 03:35 PM in reply to: *Fredrik Mattsson
The piece missing is using plotfactory to go thru multiple plot engines, one per page, as i see in other examples. still working on my own process.
Contributor
Posts: 19
Registered: ‎11-01-2006
Message 7 of 8 (357 Views)

Re: Multi-page plot job?

10-05-2007 09:43 AM in reply to: *Fredrik Mattsson
I made "walk around" with PDFCreator -> I printed single pages, kept PDFCreator waiting for other pages and then combined them together.
Not exactly, what You want, but it works...
Active Member
Posts: 7
Registered: ‎06-01-2007
Message 8 of 8 (357 Views)

Re: Multi-page plot job?

07-23-2008 07:51 AM in reply to: *Fredrik Mattsson
Hi Fredrik,

I had a similar issue and I came up with a work around that you might be interested. The general idea is - when someone plots through AutoCAD, it is always plotted to file (".plt") and save the drawings on the local machine. When everything is plotted you can use the WINSPOOL API to directly communicate to the device you want to plot and using that you can submit a multipage plotting job using the plt files from saved on the local hard drive. A starting point would be to look at the C# wrapper for the WINSPOOL API. If you think this is going to be work in your case let me know and I can send the C# wrapper for the API I am using.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Welcome to the new Autodesk Community!
If this is your first visit, click here to get started and make the most of the Community. Let us know what you think of the new experience in the Community Feedback Forum.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community