Stored PDF files with Blob
I have being storing PDF files using Blob, but it is getting very time consuming to access these files again.
Is there a better way of doing it? Is there a right way of doing it? I do not need to search inside the PDF, but I do need to access them either inside the Database or outside.
Thank You for nay help
I have a need to store PDF files that are documents that will complement process that my systems creates. And I need that those PDF files be accessible from inside my system, I do not need to search insede them because they will be stored by subject inside another subject, therefore whoever need the files will know were to find it, but to store and to access it is taking longer and longer as more files are added to the first thead.
Similar Messages
-
Good Morning Everyone,
1) Create a directory(path)
C:\test\test.pdf
2) create a table to hold the BLOB:
create table test(
ID NUMBER,
DOCS BLOB
3) import the file into a BLOB datatype and insert it into the table:
DECLARE
l_bfile BFILE;
l_blob BLOB;
BEGIN
INSERT INTO tab1 (col1)
VALUES (empty_blob())
RETURN col1 INTO l_blob;
l_bfile := BFILENAME('PDF', 'test.pdf');
DBMS_LOB.fileopen(l_bfile, Dbms_Lob.File_Readonly);
DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
DBMS_LOB.fileclose(l_bfile);
COMMIT;
END;
I am wondering about the step 3.
Any help,
Thanks,
NYOracle support has a document on this topic that may be of use:
How to Load File Content to a BLOB Field and Unload BLOB Content to a File on the OS #471715.1
Also on the Oracle Directory object the path should not include the actual file name. From your post it is not easy to tell how you created it.
HTH -- Mark D Powell -- -
Storing pdf file in sql database
currently i am working on my last semester project.I am using visual studio 2010 to design front end and sql server 2008 for database. I that case i want to store the pdf file in sql server 2008 databae and want retrieve it back as and when required.is
it possible to do so please feedback me soon with an answer.look,
http://stackoverflow.com/questions/2347842/storing-pdf-files-as-binary-objects-in-sql-server-yes-or-no
Please use Marked as Answer if my post solved your problem and use
Vote As Helpful if a post was useful. -
Open PDF-File (with LinkToURL or what?) !
Hello@all,
I have a PDF-File, which I have stored in my project like a image
(->src->mimes->Components->com.sap.....Comp--->Help.pdf
In the View of this Component I want to have a LinkToURL or something else to open the PDF file with adobe.
Can someone help me for this?
Best regards
MarcusHi,
You can alternatively open Pdf using the following logic
String pdfLink = <Your Link>
FileInputStream fileIn = new FileInputStream(pdfLink);
int lastIndex = pdfLink.lastIndexOf(Constants.PATH_SEP);
String saveFileName = pdfLink.substring(lastIndex);
IWDResource resource = WDResourceFactory.createCachedResource(fileIn, saveFileName,WDWebResourceType.PDF,true);
String url = resource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal());
wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,saveFileName).show();
Hope this helps. -
How to save dynamically generated PDF files with proper file name?
Hi,
I need to save the pdf file with default name which generated by
dinamically.
this is the code i am trying to save by default
protected void processRequest (HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
OutputStream bos = response.getOutputStream ();
// this returns pdf byte array
byte ios[] = callReport ( reportId_param , fullyQualifiedReportClassName , paramHashMap ) ;
response.setContentType ("application/pdf");
// reportId_param and reportName_param supplied from some where
String docName = reportId_param + "_" + reportName_param ;
if( fromDate_req != null && toDate_req != null )
String dateStr = fromDate_req + "_to_" + toDate_req ;
dateStr = dateStr.replaceAll ( "/" , "_" ) ;
docName = docName + "_" + dateStr ;
// here docName would be like "RP_COM_COLL_01_Message_Details_03_09_2008_to_03_09_2008"
response.setHeader ("Content-Disposition","inline; filename=" + docName ) ;
bos.write (ios);
bos.flush ();
}the above code produces pdf in browser when calling this URL
http://localhost:8080/DAD01TN0801027/RWReportServlet
In browser we can save this PDF by using two ways
1. File -> Save As
2. By using Save Icon within the PDF toolBar
both the actions uses the file name "RWReportServlet" as default instead of using docName
Can any one help me please
Regards
Sakthivel.That said, your code is not very efficient. You're storing the complete PDF file in memory. What if the PDF file is fairly large? And what if multiple users download multiple large PDF files simultaneously? Your server would run out of memory. Rather use InputStream instead of a raw byte[]. And preferably buffer it.
You should also be setting the content-length header by the way. -
I cannot open a pdf file with aol e-mail. I went to preferences in Adobe Reader but did not know what to enter for Incoming IMAP and outgoing SMTP. I can open pdf files from windows explorer as I have associated .pdf files with adobe reader. My operating system is windows 7.
When I try to open the pdf file within aol e-mail I get a message: 'Your security settings do not allow this file to be downloaded'. I have not changed my security settings (Tools, Internet Options, security).Or http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html
-
Writing a java program for generating .pdf file with the data of MS-Excel .
Hi all,
My object is write a java program so tht...it'll generate the .pdf file after retriving the data from MS-Excel file.
I used POI HSSF to read the data from MS-Excel and used iText to generate .pdf file:
My Program is:
* Created on Apr 13, 2005
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
package forums;
import java.io.*;
import java.awt.Color;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.Font.*;
import com.lowagie.text.pdf.MultiColumnText;
import com.lowagie.text.Phrase.*;
import net.sf.hibernate.mapping.Array;
import org.apache.poi.hssf.*;
import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.hssf.usermodel.*;
import com.lowagie.text.Phrase.*;
import java.util.Iterator;
* Generates a simple 'Hello World' PDF file.
* @author blowagie
public class pdfgenerator {
* Generates a PDF file with the text 'Hello World'
* @param args no arguments needed here
public static void main(String[] args) {
System.out.println("Hello World");
Rectangle pageSize = new Rectangle(916, 1592);
pageSize.setBackgroundColor(new java.awt.Color(0xFF, 0xFF, 0xDE));
// step 1: creation of a document-object
//Document document = new Document(pageSize);
Document document = new Document(pageSize, 132, 164, 108, 108);
try {
// step 2:
// we create a writer that listens to the document
// and directs a PDF-stream to a file
PdfWriter writer =PdfWriter.getInstance(document,new FileOutputStream("c:\\weeklystatus.pdf"));
writer.setEncryption(PdfWriter.STRENGTH128BITS, "Hello", "World", PdfWriter.AllowCopy | PdfWriter.AllowPrinting);
// step 3: we open the document
document.open();
Paragraph paragraph = new Paragraph("",new Font(Font.TIMES_ROMAN, 13, Font.BOLDITALIC, new Color(0, 0, 255)));
POIFSFileSystem pofilesystem=new POIFSFileSystem(new FileInputStream("D:\\ESM\\plans\\weekly report(31-01..04-02).xls"));
HSSFWorkbook hbook=new HSSFWorkbook(pofilesystem);
HSSFSheet hsheet=hbook.getSheetAt(0);//.createSheet();
Iterator rows = hsheet.rowIterator();
while( rows.hasNext() ) {
Phrase phrase=new Phrase();
HSSFRow row = (HSSFRow) rows.next();
//System.out.println( "Row #" + row.getRowNum());
// Iterate over each cell in the row and print out the cell's content
Iterator cells = row.cellIterator();
while( cells.hasNext() ) {
HSSFCell cell = (HSSFCell) cells.next();
//System.out.println( "Cell #" + cell.getCellNum() );
switch ( cell.getCellType() ) {
case HSSFCell.CELL_TYPE_STRING:
String stringcell=cell.getStringCellValue ()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringcell);
// document.add(new Phrase(string));
System.out.print( cell.getStringCellValue () );
break;
case HSSFCell.CELL_TYPE_FORMULA:
String stringdate=cell.getCellFormula()+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(stringdate);
System.out.print( cell.getCellFormula() );
break;
case HSSFCell.CELL_TYPE_NUMERIC:
String string=String.valueOf(cell.getNumericCellValue())+" ";
writer.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
phrase.add(string);
System.out.print( cell.getNumericCellValue() );
break;
default:
//System.out.println( "unsuported sell type" );
break;
document.add(new Paragraph(phrase));
document.add(new Paragraph("\n \n \n"));
// step 4: we add a paragraph to the document
} catch (DocumentException de) {
System.err.println(de.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
// step 5: we close the document
document.close();
My Input from MS-Excel file is:
Planning and Tracking Template for Interns
Name of the Intern N.Kesavulu Reddy
Project Name Enterprise Sales and Marketing
Description Estimated Effort in Hrs Planned/Replanned Actual Actual Effort in Hrs Complexity Priority LOC written new & modified % work completion Status Rework Remarks
S.No Start Date End Date Start Date End Date
1 setup the configuration 31/01/2005 1/2/2005 31/01/2005 1/2/2005
2 Deploying an application through Tapestry, Spring, Hibernate 2/2/2005 2/2/2005 2/2/2005 2/2/2005
3 Gone through Componentization and Cxprice application 3/2/2005 3/2/2005 3/2/2005 3/2/2005
4 Attend the sessions(tapestry,spring, hibernate), QBA 4/2/2005 4/2/2005 4/2/2005 4/2/2005
The o/p I'm gettint in .pdf file is:
Planning and Tracking Template for Interns
N.Kesavulu Reddy Name of the Intern
Enterprise Sales and Marketing Project Name
Remarks Rework Status % work completion LOC written new & modified Priority
Complexity Actual Effort in Hrs Actual Planned/Replanned Estimated Effort in Hrs Description
End Date Start Date End Date Start Date S.No
38354.0 31/01/2005 38354.0 31/01/2005 setup the configuration 1.0
38385.0 38385.0 38385.0 38385.0 Deploying an application through Tapestry, Spring, Hibernate
2.0
38413.0 38413.0 38413.0 38413.0 Gone through Componentization and Cxprice application
3.0
38444.0 38444.0 38444.0 38444.0 Attend the sessions(tapestry,spring, hibernate), QBA 4.0
The issues i'm facing are:
When it is reading a row from MS-Excel it is writing to the .pdf file from last cell to first cell.( 2 cell in 1 place, 1 cell in 2 place like if the row has two cells with data as : Name of the Intern: Kesavulu Reddy then it is writing to the .pdf file as Kesavulu Reddy Name of Intern)
and the second issue is:
It is not recognizing the date format..it is recognizing the date in first row only......
Plz Tell me wht is the solution for this...
Regards
[email protected]Don't double post your question:
http://forum.java.sun.com/thread.jspa?threadID=617605&messageID=3450899#3450899
/Kaj -
Recently I got a new laptop, with excel 2010 version and acrobat 9 standard.
I could no longer print (save as) an excel file with multiple tabs into a pdf file with bookmarks.
My old computer has excel 2007 version and acrobat 9 standard.
Print an excel file into pdf with bookmarks was a piece of cake.
Both machine has the same add-in -- Acrobat PDFMaker Office COM addin
Thanks if anyone could help me with this.
TomYou need to upgrade Acrobat to a newer version.
On Thu, Oct 30, 2014 at 4:12 PM, excel-pdf-bookmarks < -
How do I create a single PDF file with multiple pages?
Hi, I occasionally need merge several jpg images into a single pdf file with multiple pages (one Jpg per page). I have tried doing this on Preview, and by selecting all the pages I want to include in my document and trying to save to Pdf through the "Print" function, but every time it only saves the first page.
Can anyone tell me if there is a way to save multple-page pdf files without having to purchase a specific program (i to this too infrequently to justify the cost)?
Thanks very much,This works for me...
Open first image in Preview View > Sidebar. Drag the other images into Sidebar, then select all.
From File menu > print selected images. Choose PDF > Save as PDF
-mj -
How do I move a picture from one pdf-file to another, already created pdf-file, with adobe reader?
Reader doesn't have editing capabilities.
-
How do I create an interactive PDF file with variable data
We would like to basically do a 'mail merge' of our list of customers with an interactive PDF file (including videos, menus, etc - not just form fill out and web links) to create a single PDF file that contains multiple mail pieces ... one for each customer ... with each mail piece being customized for that customer. Customizations would include different greetings (Dear Bob, Dear Dana, etc), as well as different charts based on data unique to the customer, different photographs, etc.
I've seen that InDesign and Acrobat Professional can be used to create an interactive PDF (such as from http://tv.adobe.com/watch/ask-the-adobe-ones/14-calling-rufus-about-interactive-pdf-making). However I don't understand how I can insert data from a database, csv file, excel file etc into the PDF file so that each page, or each set of pages, within the PDF can be customized.
Can anyone point me to a tool to use for this?
Thanks,
Bob KendallFor that kind of volume and unattended operation, you want InDesign Server – which is the server/high volume edition of INDD.
From: Adobe Forums <[email protected]<mailto:[email protected]>>
Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
Date: Thu, 3 Nov 2011 06:58:07 -0700
To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
Subject: How do I create an interactive PDF file with variable data
Re: How do I create an interactive PDF file with variable data
created by Ti26E31DSxxx<http://forums.adobe.com/people/Ti26E31DSxxx> in PDF Language and Specifications - View the full discussion<http://forums.adobe.com/message/4005459#4005459 -
How to open a pdf file with command in WebBrowser control?
Installed acrobat 6 or7 in my PC, then I load a WebBrowser control in IE to open a local pdf file with command line, such as "Page=3", and then open the same pdf file with WebBrowser control in other IE process, I found the command will affect other open and show operations in webbrowser. is it normal? That is to say, When i set command "Page=3", the second time WebBrowser still open pdf with command "Page=3",I think it is bad.
Hello:
Thanks for your reply. I installed Acrobat6.0 or 7.0 in my PC, then i load a WebBrowser Control in IE by Html, then open local pdf with different command by running IE. We can get the command in this website: http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
First:open local pdf with command : oWebBrowser.Navigate("G:
PDF
07000001.pdf#Page=3&Pagemode=thumbs", null, null, null, null);
Second:Open the same local pdf with no command: oWebBrowser.Navigate("G:
PDF
07000001.pdf", null, null, null, null)
【Result】The first command "#Page=3&Pagemode=thumbs" will effect the way of showing pdf when second open. But, the phenomenon will not appear in Acrobat 8.0, 9.0, 10.0. -
Looking for advice on how to share pdf files with iPad from Mac. Pages seems to only recognize text. What app is recommended for pdf documents?
Welcome to Apple Support Communities!
If I understand your question, you want to read pdfs on your iPad, not create or edit.
Drag pdf files to the iPad icon in Finder while connected to your computer via the USB cable.
They will show up in the iBooks application
(If you don't already have iBooks, it's a free download from the App Store.)
Once installed, there are two buttons at the top left of the Bookshelf.
One is Books, the other is Collections.
Tap Collections, and you'll see Books and PDFs.
Tap PDFs and you're there. -
Problem opening pdf files with Adobe Reader in Windows 7
I bought a new Dell (Inspiron 5110) with pre-installed Windows 7 Home Premium (Version 6.1 SP1, 64 bit) and pre-installed Adobe Reader X (10.1.1). I cannot open ANY of my old pdf files with the Adobe reader (even after I re-installed the Adobe Reader). On another computer with Windows 7 I get the same error message. When I installed several other pdf-readers (Sumatra, Foxit, ..) I can still not open the pdf's -- but all the pdf's still open under Windows XP on my old computer and they also open on all my colleagues' non-Windows 7 computers. So it appears to be a Windows 7 problem. The Adobe error message says 'Adobe Reader could not open _.pdf because it is either not a supported file type or because the file has been damaged (…..).
N.B.: I can download pdf files from the internet and can then open these 'new' pdf files with Adobe Reader X.
N.B.2.: Most of the 'old' pdf files are scientific articles downloaded from various journal websites 2002-2011, so their quality should be out of question.
N.B.3.:I've transfered the files via memory stick and portable HD.
N.B.4.: If I try to open the pdf's via 'Open with' the problem remains the same.
N.B.5.: When, on my Win7 Dell, I've uploaded/attached one of these old pdf files to an email the rtecipient could not tead it. But he could read it when I'd sent the same file from my old Win XP computer.
N.B.6.: I have repeated this last observation: When I upload an old pdf file on my Win7 Dell to my email account and then send it to myself, I cannot open/read it on my Win XP (nor on the Dell, of course). Although the file size is precisely the same.
N.B.7.: When I download a new pdf on my Dell, then upload/attach it to an email also on the Dell and send it to myself, I can download and read the attached pdf on both computers.
Would be grateful for any suggestions.This is really strange.
Please correct me if I am wrong, but from what I can understand, any PDF which is launched on your Win 7 OS fails to open, even though the same file works perfectly fine on your Win XP machine?
Could you please run a full system anti virus scan on the said PDFs that are present on your local system. It could be a case of infected PDFs.
Also, it would be great if you could try and download some of the erroneous PDFs from the web again, and see if you experience the same behavior.
Thanks
Ankit -
How do I edit a PDF file with Adobe PDF Pack?
How do I edit a PDF file with Adobe PDF Pack?
Well, you don't. Editing a PDF is a difficult and fraught business even with the most expensive software.
But PDF Pack lets you export to Word; then often you can edit in Word. Now you can make a new PDF. It might look like the original, or it might not. If small changes matter you might be out of luck. ON NO ACCOUNT USE THIS FOR GOVERNMENT FORMS.
Maybe you are looking for
-
Help with Inconsistent data from NI6211
I'm not getting very far with establishing good data transfer from an NI 6211 and don't seem to be able to pin point the issue or get confidence from DasyLab V10 to be able to look for the problem in another area. The NI6211 is set for period measure
-
I have a lab of twenty five 27" iMacs with i3 processors and OS 10.7.5.. Each has 12 gb ram. I'm in a large public school district that maintains tight control over our networks and each individual computer. Many of my students ask what type of editi
-
After system copy new system size is leeer than old system
Hii, Our client system is upgrading now. So Production BW system copy is done to new system. New system size is lesser than the Production system. Could any one let me know why this was happen. All the available in production BW is availalable in New
-
How to start OracleOraDb10g_home1iSQL*Plus service from command line (PC)
After installing 10G, I now have a service with this name: OracleOraDb10g_home1iSQL*Plus I need to be able to start/stop the service from windows 2000 command line, BUT "net start OracleOraDb10g_home1iSQL*Plus" DOES NOT WORK. Adding quotes around the
-
Problems printing from PC to MAC on wireless network
I've just spent 3 hours trying to get my 3 Vista PCs to print to the printer that is connected to my iMAC. The iMAC is running Snow Leopard. The printer is a HP Deskjet F300 series and is connected to the iMAC via USB. The MAC and the printer work fi