Home » Developer & Programmer » Forms » How to open pdf files using forms 6i
icon9.gif  How to open pdf files using forms 6i [message #159292] Fri, 17 February 2006 03:45 Go to next message
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

  • Attachment: open_word.txt
    (Size: 0.99KB, Downloaded 4427 times)
Re: How to open pdf files using forms 6i [message #159387 is a reply to message #159292] Sat, 18 February 2006 00:03 Go to previous messageGo to next message
naif224
Messages: 4
Registered: November 2005
Location: riyadh
Junior Member
You must use OCX to open PDF files .

I will attachment for you a form that open specific PDF files .

and take car before open the form , double click in reg.bat

then open the form .

with regards
NF
  • Attachment: pdfocx.zip
    (Size: 221.78KB, Downloaded 6686 times)
icon9.gif  Re: How to open pdf files using forms 6i [message #159905 is a reply to message #159387] Wed, 22 February 2006 03:10 Go to previous messageGo to next message
kriti
Messages: 2
Registered: February 2006
Junior Member
It is not working working properly
And if it works then also it not the actual solution.
i want that when i double click the text item (in which the filename is written), that file should be opened in Acrobat Reader.

Note: in text item item only filename is entered & its path is picked from a variable in which i have stored the whole path i.e. where that file resides
Re: How to open pdf files using forms 6i [message #160025 is a reply to message #159905] Wed, 22 February 2006 16:13 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have a look at http://www.orafaq.com/forum/t/58701/67467/.

David
Re: How to open pdf files using forms 6i [message #160287 is a reply to message #160025] Fri, 24 February 2006 05:10 Go to previous messageGo to next message
ashishmate
Messages: 90
Registered: February 2005
Location: Mumbai
Member

Hi Kirti

Sorry Yar That (http://www.orafaq.com/forum/t/58701/67467/.
) Code Wont Work in This Condition
Ltl Bit Modification Is Req.

Try This


DECLARE
AppID PLS_INTEGER;
a varchar2(100) := 'C:\ASHish\';
BEGIN
		message(a);message(a);
AppID := DDE.App_Begin('C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe '||a||:your_text_item,DDE.App_Mode_Maximized);
exception when others then 
message(sqlerrm(sqlcode));
END;



If This IS Not Ok Then Tell Me We Will Find Out The Solution

ASHish....
Re: How to open pdf files using forms 6i [message #256789 is a reply to message #160287] Mon, 06 August 2007 12:17 Go to previous messageGo to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

hi ashish,

thanks very much yaar , actually i need that code very urgently and i found it in search forum which is given by you....

i am highly thankful to you.......

thanks very much again and again and again.......

can i ask you some more questions ,so could you please give me you mailid on which i forward my query to you.....

rajat chaudhary
icon14.gif  Re: How to open pdf files using forms 6i [message #256916 is a reply to message #256789] Tue, 07 August 2007 02:57 Go to previous messageGo to next message
ashishmate
Messages: 90
Registered: February 2005
Location: Mumbai
Member

u can use Private Messaging
ASHish...
Re: How to open pdf files using forms 6i [message #257206 is a reply to message #256916] Tue, 07 August 2007 14:22 Go to previous messageGo to next message
rajat_chaudhary
Messages: 141
Registered: November 2006
Location: india
Senior Member

of fine sir
icon9.gif  How to open pdf files using forms 6i [message #417250 is a reply to message #160287] Thu, 06 August 2009 13:35 Go to previous messageGo to next message
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 #417274 is a reply to message #417250] Thu, 06 August 2009 19:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Did you use 'message;pause;' pairs to determine which line is failing? Is this your first form? Is this a new Oracle Forms installation?

David
Re: How to open pdf files using forms 6i [message #417366 is a reply to message #417274] Fri, 07 August 2009 10:47 Go to previous messageGo to next message
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 #417488 is a reply to message #417366] Sun, 09 August 2009 19:58 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Remember that you have to either duplicate the 'message' command or follow it with a 'pause' command to get the 'real' message to display.

Please post all of your code. Also search this forum for 'pdf'. There are many threads covering the display of pdfs.

David
Re: How to open pdf files using forms 6i [message #417643 is a reply to message #417488] Mon, 10 August 2009 13:35 Go to previous messageGo to next message
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 #417644 is a reply to message #417643] Mon, 10 August 2009 14:03 Go to previous messageGo to next message
antoniapj
Messages: 8
Registered: August 2009
Junior Member
Sorry,

foget the error: 106555: non-ORACLE exception
Re: How to open pdf files using forms 6i [message #417670 is a reply to message #417644] Mon, 10 August 2009 20:55 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I repeat, please post all the code in your trigger and specify on which line it fails. Please use the 'message;pause;' pair method to determine the line which is failing.

David
Re: How to open pdf files using forms 6i [message #417807 is a reply to message #417670] Tue, 11 August 2009 10:47 Go to previous messageGo to next message
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.
Re: How to open pdf files using forms 6i [message #418070 is a reply to message #417807] Wed, 12 August 2009 19:54 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Searching this forum for 'dde.app_begin' returned http://www.orafaq.com/forum/m/404889/67467/?srch=DDE.App_Begin#msg_404889 Try this alternate method of determining the path to 'acrobat.exe'.

Let's go back just a bit, have you added new code to this form? Perhaps a new library call? Did you do a Ctrl-Shft-K (Compile All) before Ctrl-t (Generate)?

David
Re: How to open pdf files using forms 6i [message #418245 is a reply to message #418070] Thu, 13 August 2009 11:11 Go to previous messageGo to next message
antoniapj
Messages: 8
Registered: August 2009
Junior Member
Hi,
I do Ctrl-Shft-K (Compile All), but my problem follow.

I don't added new code or library. Some other idea, my form if it open acrobat, but what it does not work is the DocSaveAs

Thanks a lot.

Regards!
Re: How to open pdf files using forms 6i [message #418291 is a reply to message #418245] Thu, 13 August 2009 20:52 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Googling 'DocSaveAs' found http://msdn.microsoft.com/en-us/library/microsoft.office.tools.word.document.saveas(VS.80).aspx and http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=6647 and http://www.acrobatusers.com/forums/aucbb/viewtopic.php?id=6636 plus others in the Acrobat User Community Forums.

David
Re: How to open pdf files using forms 6i [message #529511 is a reply to message #159292] Tue, 01 November 2011 11:43 Go to previous message
inspirer2008
Messages: 3
Registered: October 2011
Location: Jordan
Junior Member
Hi

Try to use this


host('cmd /c start '||DOC_FILE_PATH, no_screen);



Regards
Previous Topic: No data in list item (merged 3)
Next Topic: in INSERT mode when enter some field and the i press botton
Goto Forum:
  


Current Time: Sun Apr 28 01:13:13 CDT 2024