Hi,
It's working very nice.
Just one question. The program is doing everything without showing the PDF while working, except in the 'merge' routine.
Then Acrobat is shown, and you can see the program manipulating it. Is is possible toe hide this also, because sometimes an error occur when the user click the mouse on the PDF.
While debugging, I found the place where it shows Acrobat.
This is the part of the mergemultipdf() function.
It's very strange, because on other places in the program the same function is used, without showing the Acrobat.
I moved 1 line, because the program inserted the files always on the second page, instead adding it at the end.
- Code: Select all Expand view
IF !lOk
MsgInfo("error al abrir "+ cEntra1 +" pdf" )
oAVDoc1 := nil
RETURN .f.
ENDIF
oPDDoc1 = oAVDoc1:GetPDDoc()
// X = oPDDoc1:GetNumPages() - 1 //Moved this line from here
for i=2 to len( aPdfIni )
X = oPDDoc1:GetNumPages() - 1 //Moved to here
cEntra2:= aPdfIni[i]
lOk := oAVDoc2:Open(cEntra2, "") //Here Acobat is shown
IF !lOk
MsgInfo("error al abrir "+ cEntra2 +" pdf" )
RETURN .f.
ENDIF
oPDDoc2 = oAVDoc2:GetPDDoc()
lOk := opDDoc1:InsertPages( x, OPDDoc2, 0, oPDDoc2:GetNumPages(), 0 )
IF !lOk
MsgInfo("Se no pudo insertar el documento "+ cEntra2 +"en " +cEntra1 )
RETURN .f.
ENDIF
opDDoc2:Close()
opddoc2:= nil
oAVDoc2:Close(1)
next
if Empty( cPdfEnd )