Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Apr 27, 2017 11:53 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Display PDF's files from database
PostPosted: Thu Apr 11, 2013 9:55 am 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
Good morning, I am new to this forum and still no expert Real Studio.
Who can help me with this, I'm trying to view PDF files from Oracle. The field BLOB store. I can find the object, since the list box does not give me the name of the stored documents.
Greetings ... :)


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Thu Apr 11, 2013 2:20 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
dhernandez wrote:
Good morning, I am new to this forum and still no expert Real Studio.
Who can help me with this, I'm trying to view PDF files from Oracle. The field BLOB store. I can find the object, since the list box does not give me the name of the stored documents.
Greetings ... :)


Write the blob data to file and use folderitem.launch (setting the folderitem to the path of the temporary pdf file)...you will have to create a name for the pdf if that information is not stored in the database...

ex....

write the pdf blob to SpecialFolder.ApplicationData.Child("tempname.pdf") (or somewhere else) then

SpecialFolder.ApplicationData.Child("tempname.pdf").launch to open it.

this would be the most simplistic method.

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Thu Apr 11, 2013 5:22 pm 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
Thanks for answering.
But to display the PDF file, I show a WebImageView? Or open the PDF reader installed on my system ...
I will do as you comment and I will report the results.
Good day. :)


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Thu Apr 11, 2013 6:36 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
dhernandez wrote:
Thanks for answering.
But to display the PDF file, I show a WebImageView? Or open the PDF reader installed on my system ...
I will do as you comment and I will report the results.
Good day. :)



using the command .Launch will load the pdf in the default system reader...webimageview is a web edition class which is the web equivalent of an ImageView (desktop apps)...Neither of which will help you at all... to save the blob...

'load the blob into a string using the blob.stringvalue. To save it....

Dim SavetheFile as new TextOutputStream
SavetheFile = TextOutputStream.Open(folderitemdeclaredTMPPDF) ' replace with the actual FolderItem
Savethefile.Write theStringValueofTheBlob
SavetheFile.Close

'now lets open the PDF....
folderitemdeclaredTMPPDF.Launch 'as before, replace the first part with the actual folderitem of the PDF file above

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Thu Apr 11, 2013 6:59 pm 
Offline

Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12388
Location: Portland, OR USA
Is it a web app or a desktop app? The answer will be different for each.


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Thu Apr 11, 2013 9:21 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
timhare wrote:
Is it a web app or a desktop app? The answer will be different for each.


I was going to ask the same thing but noticed it was in the windows section so assumed it was a desktop app :-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Fri Apr 12, 2013 4:52 am 
Offline
User avatar

Joined: Wed May 10, 2006 2:42 pm
Posts: 2985
Location: Germany
It may be worth looking into our DynaPDF Pro plugin for Real Studio.
It can render PDF pages. For a Web app you could render directly to JPEG and create a Webpicture from it.
For desktop you can render to picture and draw it in a canvas.

Greetings
Christian

_________________
See you in Orlando, Florida for Real World 2013
More details and registration here:
http://www.realsoftware.com/community/realworld.php


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Fri Apr 12, 2013 8:57 am 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
Thanks for your answers ... From the outset I should clarify that I'm working on a web application. An apology.
I will do what you said Simulanics, because the canvas or ImagenView I can not watch it.
Thank you for your help. :mrgreen:


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Fri Apr 12, 2013 9:10 am 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
I want to display as the example of MonkeyBreadSoftware is at the following link http://webapps.monkeybreadsoftware.de/webpdf/webpdf.cgi. That's exactly what I do. Only if you can, without the plugin DynaPDF of MBS.


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Fri Apr 12, 2013 10:49 am 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
I have included a desktop demo of how to read and open pdf's...the same can be employed using the webHTMLViewer and you can use a javascript to check to see if a user has adobe on their system or use an open source javascript (ie https://github.com/mozilla/pdf.js/) which will load a pdf in the window without any requirements...if you need help implementing this...send me a message and will be glad to get an example working with a re-usable module and/or custom web control :-)

the desktop demo is at

http://realdevspot.com/pdf.rar

here is the web demo with using HTML5 only :-)
http://www.realdevspot.com/j-code/pdf/e ... elloworld/

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Last edited by simulanics on Fri Apr 12, 2013 11:06 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Fri Apr 12, 2013 11:00 am 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
SIMULANICS Thanks, I will verify what I said and I will report results. :mrgreen:


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Mon Apr 15, 2013 9:13 am 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
Good morning to all. I still have problems creating the page to show me PDF's files. All I got was with their help to open the PDF file, but with the reader system. And so the user can save or copy the contents of the document and that is precisely what I want to avoid.
I'm performing them as an image, but is more complicated. :?


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Mon Apr 15, 2013 12:29 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
dhernandez wrote:
Good morning to all. I still have problems creating the page to show me PDF's files. All I got was with their help to open the PDF file, but with the reader system. And so the user can save or copy the contents of the document and that is precisely what I want to avoid.
I'm performing them as an image, but is more complicated. :?



I'll work on embedding the PDF html5 javascripts I recently posted into a direct custom webControl for you :-) have a 14 hr ride today, so I'll have plenty of time to work on it :-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Mon Apr 15, 2013 12:37 pm 
Offline
User avatar

Joined: Sun Aug 12, 2007 10:10 am
Posts: 1086
Location: Boiling Springs, SC
This may also be an alternative if you cannot wait :-)

http://stackoverflow.com/questions/7813 ... ike-scribd

There are a million and one ways :-)

Convert PDF to swf and embed? :-)

http://www.swftools.org/

Also has a commandline option so new PDFs can automatically be converted ;-)

_________________
Matthew A. Combatti
Real Studio 2012 r1.2

Visit Xojo Developer's Spot!
Systems I Use:
Windows XP/Windows Vista/Windows Server 2008 r2/Windows 7/Windows 8
Mac OSX 10.5/Mac OSX 10.6/Mac OSX Server/Ubuntu/Debian/Suse/Red Hat/
Windows Server 2011/CentOS 5.4 /ReactOS/SimOS

~All Xojo Compatible~


Top
 Profile  
 
 Post subject: Re: Display PDF's files from database
PostPosted: Mon Apr 15, 2013 1:51 pm 
Offline

Joined: Tue Apr 09, 2013 3:09 pm
Posts: 24
Location: Reynosa, Tamps. Mexico
Thanks SIMULANICS, I'm seeing the links placed. thanks ..


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group