How to open pdf files using forms 6i [message #159292] |
Fri, 17 February 2006 03:45 |
kriti
Messages: 2 Registered: February 2006
|
Junior Member |
|
|
How can I open any pdf(Acrobat Reader) file thru Oracle Forms 6i through procedure.
I have written procedure to open .Doc & .XLS files by using OLE2.Create_Object but unable to do for .PDF files.
Plz help me
I m attaching the code in txt file , how i have done it for word
open_word is the name of the procedure/program unit
|
|
|
|
|
|
|
|
|
|
How to open pdf files using forms 6i [message #417250 is a reply to message #160287] |
Thu, 06 August 2009 13:35 |
antoniapj
Messages: 8 Registered: August 2009
|
Junior Member |
|
|
Hi Ashish,
I have the same problem with the file opening pdf from forms 6, although in fact what I need is to recover data of the file, already I open it, but I cannot recover data, you can help me I am using package DDE.
look:
filename := 'C:\file.pdf';
AppID := DDE.App_Begin('C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe'||' '||filename,DDE.APP_MODE_MAXIMIZED);
ConvID := DDE.Initiate('acroview','control');
DDE.Execute(ConvID,'[DocFind(H:file.pdf),TOTAL,FALSE,FALSE,FALSE]',1000);
--here oracle marks to error NON ORACLE EXCEPTION
not that I can need or that this bad one. I thank for much the aid.
|
|
|
|
Re: How to open pdf files using forms 6i [message #417366 is a reply to message #417274] |
Fri, 07 August 2009 10:47 |
antoniapj
Messages: 8 Registered: August 2009
|
Junior Member |
|
|
Hi David,
Thanks for the aid.
I have put a message to exactly know the line in which it marks error, it is not my first form, but the first time that attempt to recover data of a file pdf, and is not new my installation of forms.
I have a idea, to keep the file like .txt since if I can open the file, but marks the same error to me. The line that use is the following one:
DDE.Execute(ConvID,'[DocOpen(C:\ORIGINAL.pdf)]',1000);
DDE.Execute(ConvID,'[DocSaveAs(C:\ORIGINAL.pdf, C:\nuevo.txt)]',1000);
Greetings!
|
|
|
|
Re: How to open pdf files using forms 6i [message #417643 is a reply to message #417488] |
Mon, 10 August 2009 13:35 |
antoniapj
Messages: 8 Registered: August 2009
|
Junior Member |
|
|
Hi David,
Again, thanks.
The error that marks to me is:
Now with respect to the code, he is everything what I have because what interests to me or what I need is to recover data of a file pdf, but still profit not to save the file like .txt
Regards
|
|
|
|
|
Re: How to open pdf files using forms 6i [message #417807 is a reply to message #417670] |
Tue, 11 August 2009 10:47 |
antoniapj
Messages: 8 Registered: August 2009
|
Junior Member |
|
|
Hi David,
Here code:
DECLARE
filename VARCHAR2(256);
ConvID PLS_INTEGER;
AppID PLS_INTEGER;
BEGIN
filename := 'C:\CSI_DATA\txt\FACTURACION_422_ORIGINAL.pdf';
AppID := DDE.App_Begin('C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe' ||' '||filename, DDE.APP_MODE_MAXIMIZED);
DDE.App_Focus(AppID);
ConvID := DDE.Initiate('acroview','control');
DDE.Execute(ConvID,'[DocOpen(C:\CSI_DATA\txt\ORIGINAL.pdf)]',1000);
DDE.Execute(ConvID,'[FileOpen(C:\CSI_DATA\txt\ORIGINAL.pdf)]',1000);
DDE.Execute(ConvID,'[DocGoTo(C:\CSI_DATA\txt\ORIGINAL.pdf, 30)]',1000);
DDE.Execute(ConvID,'[DocDeletePages(C:\CSI_DATA\txt\ORIGINAL.pdf, 29, 29)]',1000);
DDE.Execute(ConvID,'[DocSaveAs(C:\CSI_DATA\txt\ORIGINAL.pdf, C:\CSI_DATA\txt\Nueva.txt)]',5000); --this line failed
EXCEPTION
WHEN DDE.DDE_APP_NOT_FOUND THEN
MESSAGE('APP NOT FOUND');
WHEN DDE.DDE_APP_FAILURE THEN
MESSAGE('APP FAILED');
WHEN DDE.DDE_INIT_FAILED THEN
MESSAGE('INIT FAILED');
WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
MESSAGE('CLIENT FAILED TO ESTABLISH CONVERSATION');
WHEN OTHERS THEN
MESSAGE(SQLERRM);
END;
Thanks.
|
|
|
|
|
|
|