Page 1 of 1

ACROPDF

Posted: Mon May 01, 2023 7:16 pm
by Pg_cts
Buenas noches,

A traves del Activex ACROPDF he insertado un pdf en un dialogo, el cual dispone de _ para rellenar.

Una vez que se completan los datos en el PDF quiero guardarlo, pero no lo consigo.

para crear el objeto he usado:

Code: Select all | Expand

o:oAcrobat = TActiveX():New( o:oDlg, "AcroPDF.PDF" )
Para Guardarlo con _ realizados he probado con:

Code: Select all | Expand

o:oAcrobat:do("save","c:\docum\prueba.pdf")

Code: Select all | Expand

o:oAcrobat:do("savefile","c:\docum\prueba.pdf")
No me funciona, pero tampoco me da error.

Alguna ayuda. Gracias

Re: ACROPDF

Posted: Mon May 01, 2023 7:43 pm
by cnavarro
Analizando con Fivewin el objeto "AcroPDF.PDF.1", instalado en mi ordenador, me devuelve los metodos accesibles, o supuestamente, como siempre hay que decir en _
STDCALL dispatch FUNC void QueryInterface( [in] PTR, [out] PTR )
STDCALL dispatch FUNC unsigned long AddRef()
STDCALL dispatch FUNC unsigned long Release()
STDCALL dispatch FUNC void GetTypeInfoCount( [out] PTR )
STDCALL dispatch FUNC void GetTypeInfo( [in] unsigned int, [in] unsigned long, [out] PTR )
STDCALL dispatch FUNC void GetIDsOfNames( [in] PTR, [in] PTR, [in] unsigned int, [in] unsigned long, [out] PTR )
STDCALL dispatch FUNC void Invoke( [in] int, [in] PTR, [in] unsigned long, [in] unsigned short, [in] PTR, [out] PTR, [out] PTR, [out] PTR )
STDCALL dispatch PROPERTYGET BSTR src()
STDCALL dispatch PROPERTYPUT void src( [in] BSTR )
STDCALL dispatch FUNC VARIANT_BOOL LoadFile( [in] BSTR )
STDCALL dispatch FUNC void setShowToolbar( [in] VARIANT_BOOL )
STDCALL dispatch FUNC void gotoFirstPage()
STDCALL dispatch FUNC void gotoLastPage()
STDCALL dispatch FUNC void gotoNextPage()
STDCALL dispatch FUNC void gotoPreviousPage()
STDCALL dispatch FUNC void setCurrentPage( [in] int )
STDCALL dispatch FUNC void goForwardStack()
STDCALL dispatch FUNC void goBackwardStack()
STDCALL dispatch FUNC void setPageMode( [in] BSTR )
STDCALL dispatch FUNC void setLayoutMode( [in] BSTR )
STDCALL dispatch FUNC void setNamedDest( [in] BSTR )
STDCALL dispatch FUNC void Print()
STDCALL dispatch FUNC void printWithDialog()
STDCALL dispatch FUNC void setZoom( [in] float )
STDCALL dispatch FUNC void setZoomScroll( [in] float, [in] float, [in] float )
STDCALL dispatch FUNC void setView( [in] BSTR )
STDCALL dispatch FUNC void setViewScroll( [in] BSTR, [in] float )
STDCALL dispatch FUNC void setViewRect( [in] float, [in] float, [in] float, [in] float )
STDCALL dispatch FUNC void printPages( [in] int, [in] int )
STDCALL dispatch FUNC void printPagesFit( [in] int, [in] int, [in] VARIANT_BOOL )
STDCALL dispatch FUNC void printAll()
STDCALL dispatch FUNC void printAllFit( [in] VARIANT_BOOL )
STDCALL dispatch FUNC void setShowScrollbars( [in] VARIANT_BOOL )
STDCALL dispatch FUNC VARIANT GetVersions()
STDCALL dispatch FUNC void setCurrentHightlight( [in] int, [in] int, [in] int, [in] int )
STDCALL dispatch FUNC void setCurrentHighlight( [in] int, [in] int, [in] int, [in] int )
STDCALL dispatch FUNC void postMessage( [in] VARIANT )
STDCALL dispatch PROPERTYGET VARIANT messageHandler()
STDCALL dispatch PROPERTYPUT void messageHandler( [in] VARIANT )
STDCALL dispatch FUNC void execCommand( [in] VARIANT )
Pero no veo el metodo SAVE, por lo que seguramente alguno de los anteriores ( quizás el ultimo, haya que investigarlo un poco más ), o incluso analizar el metodo src que dispone del SET/GET, pero no sé si es solo para asignar/leer el nombre del fichero o lo que utiliza.

Re: ACROPDF

Posted: Mon May 01, 2023 8:35 pm
by Jimmy
hi,

i like to ask : how do you get that List of Method :?:

Re: ACROPDF

Posted: Mon May 01, 2023 11:24 pm
by cnavarro
Jimmy wrote:hi,

i like to ask : how do you get that List of Method :?:
Dear Jimmy
Look date of topic
https://forums.fivetechsupport.com/view ... 45#p144648

Re: ACROPDF

Posted: Tue May 02, 2023 3:52 pm
by Jimmy
hi,
ah, thx for Answer

i have try that CODE on some *.OCX but i got only
Image
which are the Standard Method of ActiveX ( Sample VLC ActiveX )

Re: ACROPDF

Posted: Tue May 02, 2023 7:57 pm
by Pg_cts
Gracias por tu respuesta.

Voy a investigar execCommand a ver si por ahi se puede hacer algo.

Saludos