I just uploaded files(doc & pdf) in my web server(with my coding). I want to stream those files when I click download link on my page.
please share any tutorials or any suggestions?
All,
We are running a J2EE application on WebLogic server 9.2 MP2 with a jrockit 64-bit JVM (27.3.1) on Solaris 10.
We call use runtime.exec to call an executable called jfmerge to create PDF documents.
We have found that in Solaris, when runtime.exec is called, a duplicate JVM is temporarily spawned to kick off the jfmerge process. While this is inefficient (our JVM is 5 GB, thus the duplicated shell JVM is also 5 GB), the major problem lies in the fact that when there is heavy load on this functionality (PDF generation) in our application, sometimes the duplicated JVM never exits.
When the JVM hangs, the servers create large issues (extreme application slowness and terminated user sessions) as the entire duplicate JVM get's all of its 5 GB of process size written to disk swap.
We have noted the following hung thread correlated with a hung JVM process until the process is manually killed:
"[STUCK] ExecuteThread: '17' for queue: 'weblogic.kernel.Default (self-tuning)'" id=3463 idx=0x158 tid=3460 prio=1 alive, in native, daemon
at jrockit/io/FileNativeIO.readBytesPinned(Ljava/io/FileDescriptor;[BII)I(Native Method)
at jrockit/io/FileNativeIO.readBytes(FileNativeIO.java:30)
at java/io/FileInputStream.readBytes([BII)I(FileInputStream.java)
at java/io/FileInputStream.read(FileInputStream.java:194)
at java/lang/UNIXProcess$DeferredCloseInputStream.read(UNIXProcess.java:227)
at java/io/BufferedInputStream.fill(BufferedInputStream.java:218)
at java/io/BufferedInputStream.read(BufferedInputStream.java:235)
^-- Holding lock: java/io/BufferedInputStream@0xfffffffec6510470[thin lock]
at gov/v3/common/formgeneration/sessionbean/FormsBean.getProcessStatus(FormsBean.java:809)
at gov/v3/common/formgeneration/sessionbean/FormsBean.createPDF(FormsBean.java:750)
at gov/v3/common/formgeneration/sessionbean/FormsBean.getTemplateDetails(FormsBean.java:450)
at gov/v3/common/formgeneration/sessionbean/FormsBean.generateSinglePDF(FormsBean.java:1371)
at gov/v3/common/formgeneration/sessionbean/FormsBean.generatePDF(FormsBean.java:263)
at gov/v3/common/formgeneration/sessionbean/FormsBean.endorseDocument(FormsBean.java:2377)
at gov/v3/common/formgeneration/sessionbean/Forms_qaco28_EOImpl.endorseDocument(Forms_qaco28_EOImpl.java:214)
at gov/v3/delegates/common/FormsAndNoticesDelegate.endorseDocument(FormsAndNoticesDelegate.java:128)
at gov/v3/actions/common/EndorseDocumentAction.executeRequest(EndorseDocumentAction.java:68)
at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.dispatchToExecuteMethod(V3CommonDispatchAction.java:532)
at gov/v3/fwk/controller/struts/action/V3CommonDispatchAction.executeBaseAction(V3CommonDispatchAction.java:336)
at gov/v3/fwk/controller/struts/action/V3BaseDispatchAction.execute(V3BaseDispatchAction.java:69)
at org/apache/struts/action/RequestProcessor.processActionPerform(RequestProcessor.java:484)
at gov/v3/fwk/controller/struts/requestprocessor/V3TilesRequestProcessor.processActionPerform(V3TilesRequestProcessor.java:384)
at org/apache/struts/action/RequestProcessor.process(RequestProcessor.java:274)
at org/apache/struts/action/ActionServlet.process(ActionServlet.java:1482)
at org/apache/struts/action/ActionServlet.doGet(ActionServlet.java:507)
at gov/v3/fwk/controller/struts/servlet/V3ControllerServlet.doGet(V3ControllerServlet.java:110)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:743)
at javax/servlet/http/HttpServlet.service(HttpServlet.java:856)
at weblogic/servlet/internal/StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic/servlet/internal/StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic/servlet/internal/ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic/servlet/internal/WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3231)
at weblogic/security/acl/internal/AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic/security/service/SecurityManager.runAs(SecurityManager.java:121)
at weblogic/servlet/internal/WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic/servlet/internal/WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic/servlet/internal/ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic/work/ExecuteThread.execute(ExecuteThread.java:209)
at weblogic/work/ExecuteThread.run(ExecuteThread.java:181)
at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
-- end of trace
We would like to do a couple of things:
1.) Prevent the spawning of a duplicate JVM, as we do not need any of it's functions when executing the simple jfmerge executable, and it creates massive overhead.
2.) In the short term at least prevent this duplicate JVM from handing indefinitely.
i want to create folders with the name of a pdf file for eg,abc.if it does not exists,i should create a folder with name abc_1...if abc_1 exists,i shud create abc_2.if both exxists,abc_3 and so on...the scripting is in python..can u help me??
Is converting a file to a byte array the best way to save ANY file format to disk or database var binary column?
So if someone wants to save a .gif or .doc/.docx or .pdf file, can I just convert it to a bytearray UFT8 and save it to the db as a stream of bytes?
\documentclass{book}
\usepackage{amsmath}
\usepackage[german]{babel}
\usepackage{amssymb}
\usepackage{amsxtra}
\usepackage[dvips]{epsfig,psfrag}
\usepackage{listings}
....
this is how my file starts. I didn't even edit it, I received it like this. However, if I want to make a pdf, it gives me the undefined control sequence error at the first line... What is wrong??
I'm using a JTree to browse the content of a folder and I want that when a user click on a file, the software shows a preview of it (like in the Windows Explorer).
I manage to do it for PDF file using a module downloaded from Sun, but I'd like to know if there is a way to do it using the built-in Windows API.
I want to use selenium test to cover my rails project ! but i just find little documents on selenium test . I want someone to give me some documents for selenium test of all types !like website ,pdf ,text etc. you can sent them to my gmail [email protected] Thank you ,and best regards!
I want to print report as pdf format by using crystal report in asp.net mvc but i don't know flow how to create report and print report in asp.net mvc ,
any one could help me for tutorial using crystal report in asp.net mvc ?
I'm looking for a good tool for printing Invoices, Receipts and similar documents in Java Swing. I have tried JasperReports but it is pretty hard to get a dynamic layout and it is designing for reports.
A requirement that I have is that the document should be sent directly to the printer and must not be saved to a file. So some tools that first creates an Office Document or a PDF document isn't a solution for me.
Any recommendations?
HI everyone,
Just looking for a website or pdf reference which has a color palette of the .NET (Visual Studio 2008) foreground colors? (E.g. like AliceBlue, AntiqueWhite, Cyan....)
I have a grid-view having details of customers,now I want to print cheques for all customers of the grid with single click of button instead of clicking individual print button for each and every customer.I want to implement this in asp.net MVC 1.0.Please temme hw should i proceed for this..Is iTextSharp will do any help to me or there is any other such pdf libraries which will help me to accomplish my task.
Hey,
I'm using prawn for pdf generation and everything works quite well, but now I'm having a bit of a problem.
When I put multiple tables on one page, they just get put over each other and not under each other.
Is this normal behaviour and what can I do about it?
I add the tables on the most normal behaviour btw :)
Thanks!
What are good documents to read on SAT (Boolean satisfiability problem) solvers. I have not been able to find good material via Google. The documents I found were either birds eye view, too advanced or corrupted PDF files...
Which papers/documents do you recommend to learn about the algorithms in modern practical SAT solvers?
I am interested in Examine for building searching in a standalone desktop app for searching db tables as well as office/.pdf files
This looks like an excellent scenario for Lucene/examine
However the doc there is minimal and while i have plenty of experience with SQL full text search, Lucene is a different beast altogether and hence looking for help/pointers on how/where to start
And yes, i did a google search but did not find any resources as the terms are fairly common ( lucene examine tutorial etc. )
I had code on Download.aspx for downloading different type of file like doc, xls, pdf etc. I usually call the page to download a file. In one of my instance i am calling this from a java script code which works fine for http://loaclhost/tp/howwuworks/howwuworks.aspx but if i put ipaddress instead of localhost then its not working.
I'm using FOP to generate PDF reports.
The problem is I need the DIN-Regular font instead of the default Times New Roman.
Can anybody tall me how to change the font?
I'm using fop-0.94.boc.02 version. Thanks
I have a small server problem when working with LAMPP and WAMP server in PHP.I am using LAMPP server for local development and I need to host in WAMP server.When try to read an image from a dynamic created pdf file in LAMPP, it is working perfectly but, the same one not compact able with WAMP server.What will be the problem?Any additional feature need to configure in WAMP.Please help me to go forward.Please........
It didn't always do this, but ever since I split my database and made the front-end an ACCDE file, any time I try to compact and repair either file, a new file called "Database 1" is generated and my original file size doesn't change.
Is this normal?
My ACCDB is roughly 20MB, and my ACCDE is just over 1M after being used the first time. Before opening, the ACCDE was only 600k (I have lots of forms and queries, and regularly store PDF attachments.
We have an xml node "item" with an attribute "style", which is "Header1". This style can change however. We have an attribute set named Header1 which defines how this should look in a PDF, generated through xsl:fo.
This works (the use-attribute-sets is mentioned inline, in the fo:table-cell node):
<xsl:template match="item[@type='label']">
<fo:table-row>
<fo:table-cell xsl:use-attribute-sets="Header1">
<fo:block>
<fo:inline font-size="8pt" >
<xsl:value-of select="." />
</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
But this doesn't (using xsl:attribute, because the attribute @style can also be Header2 for example). It doesn't generate an error, the PDF is created, but the attributes aren't applied.
<xsl:template match="item[@type='label']">
<fo:table-row>
<fo:table-cell>
<xsl:attribute name="xsl:use-attribute-sets">
<xsl:value-of select="@style" />
</xsl:attribute>
<fo:block>
<fo:inline font-size="8pt" >
<xsl:value-of select="." />
</fo:inline>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
Does anyone know why? And how we could achieve this, preferably without long xsl:if or xsl:when stuff?
I have this code that saves a pdf file.
FileStream fs = new FileStream(SaveLocation, FileMode.Create);
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
fs.Flush();
fs.Close();
It works fine. However sometimes it does not release the lock right away and that causes file locking exceptions with functions run after this one run.
Is there a ideal way to release the file lock right after the fs.Close()
Hi Friends,
Is it possible to use more than one java bean datasource or JDBC datasource in jasper report to populate data in the pdf document.If possible can u please tell me how to do? I could not get any details in the internet, Regarding using more than one datasource in jasper report.
Hi, there.
I wish to made available a functionality that searches in all pages and content inside all the documents (word, excel, pdf, etc.) present in our SharePoint Server 2007 that all the users uploaded.
Anyone could tell me if this is possible?
Thanks in advance.
Regards.
I couldn't find a download-to-print version of the Apache C++ Standard Library User Guide anywhere - the only options available are the frames and no-frames versions online. Writing a script to wget and collate them seems overkill.
Does anyone know if a downloadable PDF or other format exists - and if not, why not?
I am need to parse a pdf file. I would like to use objective-c and Cocoa classes to do so, but I need the resulting application to run on Linux. Is this possible? My experience to Objective-C revolves around the iPhone so I'm relatively new to Cocoa. Thanks.