Upgrade from 13.6 to 10.0

Hi,

We have recently upgraded from Aspose.Words v10.0 to 13.6. Since doing this we’ve found a couple of issues and I’m not really sure where to start with them.

1) Static images print upside. This only seems to effect images that are allready on the Word document as opposed to ones we’ve added via the database.

2) Printer Trays (code below). It now seems to print to the wrong trays. Stuff sent to Tray 1 prints out on Tray 3. This works perfectly on the previous version.


CODE:-
private static void PrintDoc(string filename, string printerName, string trayName, string paperSize, System.Drawing.Printing.Duplex duplex, int fromPage, int toPage)
{
//Set licence

Stream stream = new MemoryStream(MatrixPrinterService.Properties.Resources.Aspose_Words);
Aspose.Words.License license = new Aspose.Words.License();
license.SetLicense(stream);

Document document = new Document(filename);

AsposeWordsPrintDocument awPrintDoc = new AsposeWordsPrintDocument(document);
int maxPages = document.PageCount;
if (toPage == 999) toPage = maxPages;
if (fromPage == 0) fromPage = 1;

PrinterSettings printerSettings = new PrinterSettings();
PageSettings pageSettings = new PageSettings();
PrintDocument printDoc = new PrintDocument();

printerSettings.Duplex = duplex;
printerSettings.PrinterName = printerName;
printerSettings.FromPage = fromPage;
printerSettings.ToPage = toPage;
printerSettings.PrintRange = PrintRange.SomePages;
pageSettings.PrinterSettings = printerSettings;

if (trayName != “”)
{
foreach (PaperSource paperSource in pageSettings.PrinterSettings.PaperSources)
{
if (paperSource.SourceName.Trim() == trayName)
{
printerSettings.DefaultPageSettings.PaperSource = paperSource;
pageSettings.PaperSource = paperSource;
}
}
}

//set paper size (to query the paper sizes we need permssion)
log.InfoFormat(“Attempting to set paper size to {0}”, paperSize.ToString());
foreach (System.Drawing.Printing.PaperSize ps in printDoc.PrinterSettings.PaperSizes)
{
if (ps.PaperName.ToLower().Equals(paperSize.ToLower()))
{
log.InfoFormat(“Document Size set to {0}”, ps.ToString());
printDoc.DefaultPageSettings.PaperSize = ps;
}
}

awPrintDoc.PrinterSettings = printerSettings;
awPrintDoc.DefaultPageSettings = pageSettings;

awPrintDoc.Print();
}




Hi Stuart,

Thanks for your inquiry. Could you please attach your input/output Word/PDF documents, your're getting these problems with, here for testing? I will investigate the issue on my side and provide you more information.

Best regards,