Uploading PDF in to BLOB and Retrieve PDF from BLOB
hi
I have recently started working in apex and run into a bump while trying to handle PDF file Attachments and BLOBs.
I am trying to upload a PDF file into BLOB database Column using APEX, and later view this file from DB.
I require assistance on how to upload PDF file into BLOB, and how i can later view this inside the browser window, using APEX
thanks
Maybe this blog post can help you.
Regards,
Sergio
Similar Messages
-
To store PDF into BLOB and retrieve into OLE/OCX
We would like to:
1. Store a PDF file (output of a report saved in file server) into a BLOB
column.
2. Retrieve previously stored PDF in the BLOB column and display using either
OLE automation or ActiveX (OCX) control.
I read all related documents in metalink that addresses this issue however cant
get this to work. We have Acrobat Reader 4.0. Here are some issues from the
tests that I did:
1. To load the PDF file the program code that uses BFILE and LOADFROMFILE does
not work since the database is on a remote server and the PDF file is on a
local file server. The DIRECTORY created on the database is unable to find the
PDF file.
2. Though I want the loading of the file to be programmatic, I tried
right-click on the OLE container and inserted object from file. This loaded the
file into the container (Icon on the container appeared) however I was not able
to view the document by double-clicking. An error in Adobe occured: 'There was
an error opening this document. A file read error occured'. My guess is the
'Insert Object' did not insert the file properly into the BLOB.
3. When trying to display the PDF file stored in file server (in case storing
into BLOB does not work), I used an OCX control, right-clicked and Insert
Object and select Adobe Control for ActiveX. The problem here is when I run the
form, the OCX control shows up empty and I have to 'Insert Object' again in
runtime. Once I manually insert object from runtime the GET_INTERFACE POINTER &
SET_PROPERTY works fine is displaying the document. Is there any way to
maintain the control property of the OCX when the form is run?
4. Are there any workarounds and better solution to store PDFs into BLOBs and
retrieve and display in OLE/OCX controls? Using temporary file into local drive
is not an issue.
5. Would I be able to make use of 'PDF.PdfCtrl.1' OLE class?
6. Does OLE automation work for Acrobat Reader 4.0.?
I would appreciate all the help.
ShyamIm facing a similar kind of problem. I want to store and retrieve Office files, PDF and Jpegs into/from the database to view them on web in disconnected mode. Please reply as I cant find any help/documentation regarding saving BLOB data into files. I was able to store file data into BLOB, using DBMS_LOB package.
Shahzad -
Can you use PDF Pack to open and read PDF files?
Can you use PDF Pack to open and read PDF files?
Hi Keith,
PDF Pack is a conversion tool which would convert PDF to different formats and vice versa. It cannot be used for reading PDFs.
If you want to open and read PDF file you can use Adobe Reader.
You can download Adobe Reader from below mentioned link.
Adobe Reader
let me know if you have any other questions.
Regards,
~Pranav -
I want to store and retrieve images from a oracle datrabase's BLOB type
Hi all
I am using WebLogic and Oracle 10g.I have to store images and retrieve them from a BLOB type.
Please help .Please have a look to the Database Application Developer's Guide - Large Objects
http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14249/toc.htm -
i have a windows 7 desktop with an external hard drive setup on my home network, will i be able to access this on my home network to save and retrieve files from my mac air?
Troubleshooting Home Sharing - http://support.apple.com/kb/TS2972
-
WPF- How to save and retrieve details from database
I want to develop an desktop app to save and retrieve details from database, but am having a little hitch
am getting errors in my code, kindly advice below are the required code
xaml
<Grid>
<TextBox HorizontalAlignment="Left" Height="23" Margin="144,28,0,0" TextWrapping="Wrap" x:Name="TbxId" VerticalAlignment="Top" Width="193"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="144,134,0,0" TextWrapping="Wrap" x:Name="TbxFn" VerticalAlignment="Top" Width="193"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="144,77,0,0" TextWrapping="Wrap" x:Name="TbxLn" VerticalAlignment="Top" Width="193"/>
<Label Content="Student ID" HorizontalAlignment="Left" Margin="10,28,0,0" VerticalAlignment="Top" Width="101"/>
<Label Content="Last Name" HorizontalAlignment="Left" Margin="10,134,0,0" VerticalAlignment="Top" Width="101"/>
<Label Content="First Name" HorizontalAlignment="Left" Margin="10,77,0,0" VerticalAlignment="Top" Width="101"/>
<Button x:Name="BtnSave" Content="Save" HorizontalAlignment="Left" Margin="23,206,0,0" VerticalAlignment="Top" Width="75" />
<Button x:Name="BtnBrowse" Content="Browse" HorizontalAlignment="Left" Margin="149,206,0,0" VerticalAlignment="Top" Width="75" Click="Save"/>
<Button x:Name="BtnShow" Content="Show" HorizontalAlignment="Left" Margin="294,206,0,0" VerticalAlignment="Top" Width="75"/>
<WindowsFormsHost Grid.Column="0" Margin="448,28,75,243">
<wf:PictureBox x:Name="pictureBox1" Height="150" Width="150" SizeMode="StretchImage"/>
</WindowsFormsHost>
</Grid>
cs
private void Browse(object sender, RoutedEventArgs e)
SqlConnection cn = SqlConnection(global::DatabaseApp.Properties.Settings.Default.Database1ConnectionString);
try
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "JPG Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif|All Files(*.*)|*.*";
dlg.Title = "Select Student Picture";
if (dlg.ShowDialog() == DialogResult.OK)
imgLoc = dlg.FileName.ToString();
picStu.ImageLocation = imgLoc;
catch(Exception ex)
System.Windows.MessageBox.Show(ex.Message);
Thank you
Jayjay johnHi Joakins,
I think Lloyd has a point here in that all I see there which is really database related is a connection string.
Maybe your question is more general though and you're just asking how to work with a database as a general principle.
Personally, I like entity framework and would recommend that.
You can read a shed load of stuff about it.
https://msdn.microsoft.com/en-gb/data/ef.aspx?f=255&MSPPError=-2147217396
With WPF almost every dev uses MVVM and I'm no exception.
You may find this interesting:
http://social.technet.microsoft.com/wiki/contents/articles/28209.wpf-entity-framework-mvvm-walk-through-1.aspx
The article for the second in the series is only partly written, but the sample is complete:
https://gallery.technet.microsoft.com/WPF-Entity-Framework-MVVM-78cdc204
Hope that helps.
Recent Technet articles: Property List Editing;
Dynamic XAML -
Storing MS Word, MS Excel, PDF, etc in DB and retrieving through WebForms
Hi,
We have an application that requires storing MS Word, MS Excel,
PDF and HTML docs. We're planning on storing these documents in
a table as BLOB's with a column in the table that would indicate
the MIME type for the document. We need to be able to retrieve
these documents using the WebForms application we created. The
user would prefer to view a Word document in MS Word, an Excel
document in MS Excel, and so on. As of now there is no
requirement for searching within these documents, all we have to
do is retrieve them from the db and display them to the client.
Keep in mind this is a web based app, developed with Forms6i, we
would like to give the user the ability to press a button and
have the document displayed in the appropriate program.
I've searched for examples for this type of situation and have
been unsuccessful. But after reading about Oracle Text it
sounds like this could be what I'm looking for, minus the search
capability that is. Am I looking in the right place? Is it
possible to accomplish the requirements described above using
Oracle Text? If not where should I be looking.
Any help, info or even better sample code on this would be
greatly appreciated.
Thanks in advance,
Jeff ButlerJeff,
I'm not familiar with WebForms so I will only comment about
Oracle Text.
You can use Oracle Text to store, index, and search documents in
different types of formats (HTML, XML, MS Office, PDF, etc.).
Oracle Text also provides document services like a markup version
of a document, highlighting, themes, and other linguistic
features.
Take a look at the OTN page for some sample code
http://otn.oracle.com/sample_code/products/text/content.html
Hi,
We have an application that requires storing MS Word, MS Excel,
PDF and HTML docs. We're planning on storing these documents in
a table as BLOB's with a column in the table that would indicate
the MIME type for the document. We need to be able to retrieve
these documents using the WebForms application we created. The
user would prefer to view a Word document in MS Word, an Excel
document in MS Excel, and so on. As of now there is no
requirement for searching within these documents, all we have to
do is retrieve them from the db and display them to the client.
Keep in mind this is a web based app, developed with Forms6i, we
would like to give the user the ability to press a button and
have the document displayed in the appropriate program.
I've searched for examples for this type of situation and have
been unsuccessful. But after reading about Oracle Text it
sounds like this could be what I'm looking for, minus the search
capability that is. Am I looking in the right place? Is it
possible to accomplish the requirements described above using
Oracle Text? If not where should I be looking.
Any help, info or even better sample code on this would be
greatly appreciated.
Thanks in advance,
Jeff Butler -
VBA Merge PDFs - Error when first and second PDF are the same
Using http://khkonsulting.com/2009/03/adobe-acrobat-and-vba-an-introduction/ as a guide, I am able to successfully merge multiple pdf's together into one document using VBA (Access mdb), except when the PDF being merged to has the same name as the next PDF.
Here's my scenario. An Access table is updated with a list of reports that need to be printed. All of these reports are PDF's. I loop thru this table and merge the PDF's according to an identifier, then print the group. There are times
when there are multiple copies of the same report for an identifier. If the PDF being merged to has the same name of the PDF being merged, an error occurs. How can I handle this situation?
Sample data: This identifier (ESO and Pulling) needs to merge these PDF's (Aaa.PDF) together which happen to have the same name. Aaa.PDF is trying to merge Aaa.PDF and this throws an error.
Aaa.PDF ESO Pulling
Aaa.PDF ESO Pulling
This identifier merges fine despite having the same PDF twice. But the first PDF is not named the same. Xxx.PDF is the first PDF and merges the next two into it. The last two
are named the same.
Xxx.PDF 916 Pulling
Bbb.PDF 916 Pulling
Bbb.PDF 916 Pulling
Code:
pdfDoc1.Open (filesToMerge(1))
numPages = pdfDoc1.GetNumPages()
Set pdfDoc2 = CreateObject("AcroExch.PDDoc")
Dim i As Integer
For i = 2 To intNbr - 1
pdfDoc2.Open (filesToMerge(i))
If pdfDoc1.InsertPages(numPages - 1, pdfDoc2, 0, pdfDoc2.GetNumPages(), True) = False Then
MsgBox "Cannot insert pages"
End If
pdfDoc2.Close
Next i
If pdfDoc1.Save(PDSaveFull, "C:\....\ReportPacket__" & Trim(CStr(intReportCount)) & "__" & ... & ".pdf") = False Then
MsgBox "Cannot save the modified document"
End If
pdfDoc1.Close
The pdfDoc1.InsertPages command fails, displays "Cannot insert pages", then displays "Method 'Close' of object 'CAccroPDDoc' failed.
Thanks for any help or advice.Hi
As far as I know, Access didn't provide such method. But I think you are able to achieve this goal through some 3rd party PDF component
Hope this will help you.
Best Regards
Lan
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How to generate PDF using FDF file and the PDF form template (PHP)
Hi Folks,
I'm really sorry that I couldn't follow all the valuable discussions going on here, regularly. I need some immediate help.
I NEED A PHP SOLUTION. I'm able to generate FDF files using the PDF Form Template in PHP. So, I have a collection of FDF files, which seeks the PDF template, while opened and populates the template with FDF data. Now if I need to save this PDF file, I have to do it manually clicking SAVE option. But, I need to convert FDF to PDF in bulk. So, I need some PHP based solution. The PHP script takes the PDF template and the FDF file and merges them to generate a complete populated PDF file. I know it's possible, but don't know how. I've seen Adobe FDF Toolkit. But by default it doesn't show any guideline for PHP. Please help me to write this code. I'm a professional coder. I can understand your hints and tutorials. PLEASE HELP GOOD PEOPLE.The only reason I am responding to this post is because the poster sent me a request through the forum message system asking for my help.
Although I did populate PDFs with FDF data generated by web forms a year or so ago, I have since abandoned that kind of solution. It was a big headache. I found it far more stable and flexible to use html, php and css to populate forms that are almost as nice looking as PDFs.
So my advice is, if you can possibly avoid going the FDF/PDF route, you will be better off. -
Print PDF, 5 different reports and send pdf to 5 emails to different people
Hey Forum experts.
Here's my question.
In Apex 3.0, I know that we can now print to pdf. Woohoo for that feature...
Can we print to pdf 5 different reports.
and then email those 5 different pdf outputs to 5 different emails?
Can it be done?
and then can it be done by having everything all called from one procedure or one method etc
Does anyone have an example of this ?
Thanks
Colin MackenzieSending emails can be done using Oracle XML Publisher / BI Publisher. We use that product for rendering report regions and report queries, for any more advanced printing needs, you will need to use the product directly.
-
We're having a weird issue with Illustrator that rarely can be replicated. When we're saving a file as a PDF, sometimes the PDF gets cropped to the right and bottom and we're not quite sure why it's happening. Sometimes we'll just go an open the Illustrator file again and re-save and it's fine. Other times we may need to re-start the computer or re-start Illustrator and it's fine. Other times when we do all of the above, it still crops the PDF. I'm baffled as to what's happening.
We're running 10.6.8 OS X and this is Illustrator CC.This is in Illustrator CC Version 17. It is fine when you open them back in Illustrator. I have also noticed that from Illustrator if you do a 'Save As', select PDF, then select one of the PDF presets (I use 'Press Quality) the resulting PDF when opened in Reader displays how I want it, with the artwork as it was positioned on the Illustrator artboard (not cropped). If I then open in Illustrator again, make a change to the artwork, and select 'Save' (not 'Save As') when opened back in Reader the file is cropped again.
-
Inserting and retrieving data from a BLOB
Hi All,
I have a table where in i will be storing .CSV and .XLS files as BLOBS. I have no clue as to how to read from this column and translate the data into a meaningful form!.
Can anyone help me with this?Don't store the results as BLOBS/CLOBS and unstructured solutions.
If you do, then your requirement to "read from this column and translate data into a meaningful form" will fail.
You should convert the logical representation of data in the CSV (field,row) or XLS representation into a database design following the principles of the relational model.
You will then need to write a loading mechanism, which would probably leverage external tables as an access method; or possibly heterogeneous services for binary XLS if conversion isn't an option. -
How to store and retrieve images from database...
Hi All
Anubody tell me plz how to store images in database using jsp.
and how to retrieve tme.
Plz reply...
AnuragExactly
try the links below may be those might help u in store and retrieval any kind of file.
http://www.mysqltalk.org/insert-blob-example-vt112861.html
https://java.sun.com/j2se/1.5.0/docs/guide/jdbc/blob.html
http://javaalmanac.com/egs/java.sql/GetBlob.html
http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.jdbc.doc/jdbc142.htm
and a dearly advice friend please query google b4 you post any query out here. -
How to save, update and retrieve data from two diffrent table
Hi,
I can save and retrieve data into an user defined SBO form from one database table only. How can I save retrieve and update records from two or more different tables in a single screen?
Regards,
Sudeshna.Sudeshna,
Are these tables external to SAP Business One and do not have a Business Object? If there is a Business Object available such as if you were to enter an order, that order would use the Documents object which abstracts you, the programmer, from the underlying tables that need to be updated. If you are handling multiple business objects you would need to wrap the transaction with the StartTransaction - EndTransaction methods. This information is detailed in the SAP Business One SDK Help Center that comes with the SDK.
HTH,
Eddy -
Always Access Denied when choosing Automatically Enrol and Retrieve Certificates from MMC
I am using 2008 R2 Certificate Services to issue certs across multiple forests (although don't let that muddy the waters).
I have a need to issue certificates for use with s/ldap, so I have duplicated the Kerberos cert and removed all Intended Purposes other than Server Authentication and configured appropriate security to allow Domain Controllers/Domain Admins to enrol.
The certificate also requires CA Manager Approval.
Everything looks good - I am able to enrol for the cert via the MMC, the request goes into pending, and I am then able to issue the cert. However, when I go back into the MMC on the Server that requested the cert and choose All Tasks | Automatically
Enrol and Retrieve Certificates, I choose the pending cert and then get Access Denied.
On the issuing Server, I get an Event 21 in the App Log:
Active Directory Certificate Services could not process request 8466 due to an error: Access is denied. 0x80070005 (WIN32: 5). The request was for CN=server.domain.com.
On the Server that requested the cert, I get an Event 9:
Certificate enrollment for Local system was denied by servername\Issuing CA when retrieving the pending request for a SecureLDAPCertificate certificate with request ID 8466.
The strange thing is, if I follow this procedure but using the certsrv website, it works fine and I can install the certificate.
What am I missing? Or is this one of those random quirks of AD CS?
Any help is appreciated.Hi,
Thanks for posting in Microsoft TechNet forums.
According to the error messages you provided, this can be a permission issue.
The method of Autoenrollment for a certificate depends on an Active Directory. Considering using Certsrv website was successful, the problem can be that the requester does not have enough permission to access the certificate template in Active Directory
To autoenroll a certificate template, a user or computer must belong to a security group that is assigned the read,enroll,and autoenroll permissions.
Only groups that are assigned these permissions are enabled for autoenrollment.
Could you please answer the following questions for us so that we can troubleshoot the issue more effectively?
Are the issuing CA server and the requesting CA in the same forest/domain?
regards
Ted
Maybe you are looking for
-
Mail messages disappear from the Inbox, but are still in ~/Library/Mail
Folks, I'm encountering a perplexing problem on my parent's eMac; any input would be very much appreciated...here's the story: Over the weekend, I upgraded my Dad's 1.25GHz eMac G4 to Tiger (it had been running 10.3.9). The upgrade went smoothly, and
-
How to access sent folder in mail?
couple of questions: 1) how to access sent mail folder to assure that mail has been sent? 2) how to attach a document to email? 3) how to create additional folders in mail? using att wifi
-
Shuffle not being recognised when plugged into USB
I just bought a refurbished first gen Shuffle a few days ago, it worked fine until I tried to plug it in today, nothing happened; no light. I tried wiggling it around a little bit, and the green light came on very quickly, then went off, I tried it o
-
I have a document which is stored on the server. A link is emailed to several users and when they open the file it opens in the browser. It shows the Annotations menu but all the options are disabled. When the file is opened on the Adobe Reader XI ap
-
Client side handling of exceptions thrown by a webservice
I have a webservice that is deployed in Tomcat 5.5 running on Windows XP, Java version is 1.5, using jwsdp 1.5. My client, when run as an applet in a browser (have tried IE 6 and FireFox 1), seems to be unable to parse any exception thrown from the w