Iīm thinking about may Page-Setup is not definition in currently activeDocument where I run publish
So answer perhaps copy Page-Setup from template into currently drawing
Is there a way, reading i no problem more copying
public static void ListPageSetupEx()
{
Document acDoc = Application.DocumentManager.MdiActiveDocument;
// Create a new database object and open the drawing into memory
Database acExDb = new Database(false, true);
acExDb.ReadDwgFile("C:\\Temp\\Drawing2.dwg", FileOpenMode.OpenForReadAndAllShare, true, "");
// Create a transaction for the external drawing
using (Transaction acTrans = acExDb.TransactionManager.StartTransaction())
{
DBDictionary plSettings = acTrans.GetObject(acExDb.PlotSettingsDictionaryId,
OpenMode.ForRead) as DBDictionary;
acDoc.Editor.WriteMessage("\nPage Setups: ");
// List each named page setup
foreach (DBDictionaryEntry item in plSettings)
{
acDoc.Editor.WriteMessage("\n " + item.Key);
}
// Abort the changes to the database
acTrans.Abort();
}
}
In Drawing2 is saved my Page-Setup template with name "Setup_PdfCreator"