.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi-page plot job?

7 REPLIES 7
Reply
Message 1 of 8
Anonymous
784 Views, 7 Replies

Multi-page plot job?

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).
7 REPLIES 7
Message 2 of 8
egcallis
in reply to: Anonymous

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.
Message 3 of 8
scottocad
in reply to: Anonymous

How are you merging the dwf's.?
Message 4 of 8
egcallis
in reply to: Anonymous

We took the DWF SDK toolkit that has a merge DWF solution (C++) and modified it for our purposes.
Message 5 of 8
smcclure
in reply to: Anonymous

It is capable with the classes available. Call BeginPage/EndPage (and BeginGenerateGraphics/EndGenerateGraphics) for each page within the surrounding BeginDocument/EndDocument.
Message 6 of 8
jason.brenton
in reply to: Anonymous

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.
Message 7 of 8
supec
in reply to: Anonymous

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...
Message 8 of 8
ivan.markov
in reply to: Anonymous

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost