سؤال

I can print a PDF with Acrobat (not the reader) Here is the code:

var mApp = new AcroAppClass();

var avDoc = new AcroAVDocClass();
if (avDoc.Open(filename, ""))
{
    var pdDoc = (CAcroPDDoc)avDoc.GetPDDoc();
    avDoc.PrintPagesSilent(0, pdDoc.GetNumPages()-1, 2, 1, 1);
    pdDoc.Close();                    
    avDoc.Close(1);
}    

if (mApp != null)
{
    mApp.CloseAllDocs();
    mApp.Exit();
}

This will print the PDF to the default windows printer.
Is there a way to choose the printer without changing the windows default printer?

هل كانت مفيدة؟

المحلول

Here is the documentation: http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/iac_api_reference.pdf

It seems this is not possible:

PrintPages always uses the default printer setting.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top