문제

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