kapiaba Posted November 25, 2013 Report Share Posted November 25, 2013 Personas, testando em \samples\PDF2.PRG, funciona legal, porém não me abre o MENU do ADOBE READER, somente se eu teclo ESCAPE, ele mostra o MENU do ADOBE READER, qual comando para já abrir o MENU do ABOBE READER direto, sem precisar teclar SCAPE usando ACTIVE X? http://www.4shared.com/photo/PfJE1bUF/PDF2.html // C:\FWH1306\SAMPLES\PDF2.PRG // FiveWin ActiveX support demo - Using Adobe Acrobat Reader #include "FiveWin.ch" function Main() local oWnd, oBtn DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" @ 2, 2 BUTTON oBtn PROMPT "Show PDF" SIZE 80, 20 ; ACTION ShowPDF( oWnd, oBtn ) ACTIVATE WINDOW oWnd MAXIMIZED return nil function ShowPDF( oWnd, oBtn ) local oActiveX oActiveX = TActiveX():New( oWnd, "AcroPDF.PDF.1" ) // Use "AcroPDF.PDF.1" for Acrobat Reader 7 oWnd:oClient = oActiveX // To fill the entire window surface oActiveX:Do( "LoadFile", "fwintro.pdf" ) oActiveX:Do( "SetCurrentPage", 1 ) oBtn:Hide() oWnd:ReSize() return nil Obg. Abs. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 25, 2013 Author Report Share Posted November 25, 2013 Resolvido / Resuelto / Solved.. kkkkkkkkkkkkkkkkkk #include "FiveWin.ch" function Main() local oWnd, oActiveX, oPdf, cTmp DEFINE WINDOW oWnd TITLE "FiveWin ActiveX Support" oPdf := TActiveX():New( oWnd, "AcroPDF.PDF.1" ) oWnd:oClient := oPdf oPdf : src = CurDrive() + ":\" + CurDir() + "\fwintro.pdf" oPdf:Do( "SetPageMode", "thumbnail and pages" ) oPdf:SetProp( "Src", cTmp ) oPdf:Do( "LoadFile", Lfn2Sfn(cTmp) ) //Lfn2Sfn( cFileNew ) oPdf:Do( "GetVersions" ) oPdf:Do( "SetCurrentPage", 1 ) oPdf:Do( "SetShowToolbar", .T. ) // Mostra o Menu do Adobe Reader ACTIVATE WINDOW oWnd return nil Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 25, 2013 Author Report Share Posted November 25, 2013 Huum, sempre tem que dar alguma zica... Se eu digo: oActiveX:Print() // Direto na impresora, quebra ou oPdf:Print() // quebra Não entendi... Quote Link to comment Share on other sites More sharing options...
kapiaba Posted November 25, 2013 Author Report Share Posted November 25, 2013 Personas, isto funciona perfeito, mas me surgiu uma dúvida: O preview do Adobe Reader, com este exemplo, somente mostra os botões do Adobe, Como faço, para para mostrar o MENU PRINCIPAL do ADOBE READER, para que o Usuário possa ver a Opção <Sair> do menu? Ou o Botão <Sair>? FUNCTION ShowPDF_READER( cAlias ) // usando o ADOBE READER - 25/11/2013 LOCAL oWndPdf, oPdf, cTmp DEFINE WINDOW oWndPdf TITLE "FiveWin ActiveX Support - Visualizar/Imprimir o *.PDF Usando o Adobe Reader" oPdf := TActiveX():New( oWndPdf, "AcroPDF.PDF.1" ) oWndPdf:oClient := oPdf oPdf : src = CurDrive() + ":\" + CurDir() + "\fwintro.pdf" // Mostra Preview Pequeno no lado esquedo da tela... // oPdf:Do( "SetPageMode", "thumbnail and pages" ) oPdf:SetProp( "Src", cTmp ) oPdf:Do( "LoadFile", Lfn2Sfn(cTmp) ) oPdf:Do( "GetVersions" ) oPdf:Do( "SetCurrentPage", 1 ) // oPdf:Print() // Nao funciona direto na impressora.. // Mostra a Barra de Botoes do ADOBE READER oPdf:Do( "SetShowToolbar", .T. ) ACTIVATE WINDOW oWndPdf MAXIMIZED RETURN NIL Obg. abs. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted December 18, 2013 Author Report Share Posted December 18, 2013 UP. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.