Problems reading generated pdf-files
Hi all,
I have problems reading generated pdf-files from
Report Builder 6.0.8.11.3
An error-message occurs when opening the pdf with
Adobe Acrobat 5.0.1:
... problem 110 and after moving in an empty pdf-document
the messages:
- too few operands
- an unrecognized token
I think the solution must be very simple, but the docu and
other info resources provide nothing aboutthis issue.
Greetings,
Bernhard
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by the oracle reports team:
hello,
there are no known problems with reading reports PDFs with later Acrobat Readers. maybe your file is somehow corrupt.
regards,
the oracle reports team<HR></BLOCKQUOTE>
I had to install a local printer, the network printer is not appropriate here. After that, everything is fine :-)),
Greetings,
Bernhard
null
Similar Messages
-
Problem reading attached PDF files
<!--[if gte mso 9]><xml>
</xml><![endif]--><!--[if gte mso 9]><xml>
Normal
0
false
false
false
MicrosoftInternetExplorer4
</xml><![endif]--><!--[if gte mso 9]><xml>
</xml><![endif]--><!--[if !mso]>
<object
classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
</object>
<style>
st1\:*{behavior:url(#ieooui) }
</style>
<![endif]-->
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]-->
Hello.
At my work, we use JavaMail (version 1.4.1) in server
programs, processing mails with attached files from customers. Mostly it is
TIFF images, but it can also be PDF
files, and the attached files are extracted and saved for further processing.
Sometimes, we have a problem, reading attached PDF
files. The files get saved, but is of size 0 bytes. If I forward it, however,
using an Outlook client, the forwarded item can be read by our JavaMail program, and files saved OK.
I have tried to forward it using JavaMail, but I cannot
compose the mail parts, that fails, however - of the same reasons: I cannot
read the them in:-)
It looks like it's when the mail is send from a Mac.
Anyway, the part to read is of content type "APPLICATION/APPLEFILE" whereas when it's forwarded, it's content
type is "APPLICATION/OCTET-STREAM"
The way, I read the part, is to check if the part is an
instance of an InputStream, and then saving into a byte array, like this:
h5. Object
obj = part.getContent();
if (obj instanceof
InputStream) {
InputStream
inStream = part.getInputStream();
byte[]
buffer = new byte[BUFFER_SIZE];
int
bytesRead;
BufferedOutputStream
outBufStream = new BufferedOutputStream(new FileOutputStream(attFileName));
while
((bytesRead = inStream.read(buffer)) != -1)
outBufStream.write(buffer,
0, bytesRead);
inStream.close();
h5. outBufStream.close();
Problem
is that .read() method always returns -1 when content type Is APPLICATION/APPLEFILE,
so a file of 0 bytes are created.
Interesting is perhaps, that debugging shows me that the
part instance of the InputStream actually is a
com.sun.mail.util.BASE64DecoderStream when it fails, and a
com.sun.mail.util.QPDecoderStream
when it works OK.
So I have this idea, that I's a certain type of decoder
stream we're missing? We use Java 1.6.0 update 10 and JavaMail 1.4.1. and since
we use java 1.6 we use the JAF framework from that one, I guess?
Hope you guys can help?
Thanks in advance, Per Jensen
[email protected]We have two (MS Exchange) servers (from trace log):
Microsoft Exchange IMAP4rev1-server version 5.5.2650.23
Microsoft Exchange Server 2003 IMAP4rev1 server version 6.5.7226.0
- the first one is the one, we're using here, but I have tried on the other, newer version too, and it didn't help either.
But I've found out a couple of interesting things:
1: Debugging shows me, that the part instance of the InputStream actually is a com.sun.mail.util.BASE64DecoderStream when it fails, and if I forward the mail via Outlook as described earlier, and it can be read OK, the part is a com.sun.mail.util.QPDecoderStream instance.
2: I can save the WHOLE message to a file, using message.getInputStream(), and when I opens the file I can find the individual attachments - as well as the bodytext, if any - as they are separated with the disposition, mimetype and filename fields, showed as plain text. And the attachments are showed as blocks of characters; I guess it's the ascii character representation of the bytes. Here's a snippet, note the first two sentences. They seemes to be added, somehow, when I dump the message to file(?):
<START OF DUMPED FILE>
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C9A8A2.19479FE4
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
(The body text here)
------_=_NextPart_000_01C9A8A2.19479FE4
Content-Type: application/applefile;
name="first_attachment.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="first_attachment.pdf"
AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
egAAABAAAAABAAAAigAAI6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAA1NzE2NSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
aWRzIFsgNCAwIFIgXQovQ291bnQgMQo+PgplbmRvYmoKMyAwIG9iago8PAovUHJvZHVjZXIgKEhh
...(and so on)
DMgMDAwMDAgbg0KMDAwMDAwNTM1NSAwMDAwMCBuDQowMDAwMDA2NTA5IDAwMDAwIG4NCjAwMDAw
MDc2NjUgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
MQo+PgpzdGFydHhyZWYKODgyNAolJUVPRgo=
------_=_NextPart_000_01C9A8A2.19479FE4
Content-Type: application/applefile;
name="second_attachment.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="second_attachment.pdf"
AAUWAAACAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAIAAAASgAAABAAAAAJAAAAWgAAACAAAAADAAAA
egAAABAAAAABAAAAigAAI9wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAA1NzE4MSBCTkhhdWcucGRmJVBERi0xLjMKJbe+raoKMSAwIG9iago8PAovVHlwZSAv
Q2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9L
...(and so on)
<END OF DUMPED FILE>I understand that it's base64 encoded and must be decoded, and I have tried to copy/paste the blocks separately, run them through the com.sun.mail.util.BASE64DecoderStream, and saving them as PDF files, which works fine(!).
As the solution seems to be painfull: Parse the mail to find where the attachments starts and stops and saving them as files, I hope you guys can send me on the right track?
PS: The trace log when dumping the file shows everything OK, I think. Here's a bit of the log at the end of dumping the message:
(...)MTUgMDAwMDAgbg0KMDAwMDAwNTg2NyAwMDAwMCBuDQowMDAwMDA3MDIxIDAwMDAwIG4NCjAwMDAw
MDgxNzcgMDAwMDAgbg0KdHJhaWxlcgo8PAovUm9vdCAxIDAgUgovSW5mbyAzIDAgUgovU2l6ZSAx
MQo+PgpzdGFydHhyZWYKOTMzNgolJUVPRgo=
------_=_NextPart_000_01C9A8A2.19479FE4--
A10 OK FETCH fuldført.
A11 FETCH 1 (BODY[TEXT]<40336.16384>)
* 1 FETCH (BODY[TEXT]<40336> {0}
20/03-09 15:18:21,445 3 Done, writing bytes to ByteArrayOutputStream. Size: 40336 bytes (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
20/03-09 15:18:21,445 3 Done, writing ByteArrayOutputStream to file. (..common.mail.MailUtil.dumpMessageToFile.dumpMessageToFile)
A11 OK FETCH fuldført. -
Performance problems to generate PDF files using CR
Hi,
I develop an application that read TXT files and uses this information to generate PDF files, but I'm having problems with performance to generate this PDF, each files are taking at least 1 minute to create the file. I realized that some TMP and RPT files are generated and deleted in the temp folder of the machine which is running the application, but after some time creating the PDF's the RPT files aren't deleted and I have an exception on my app:
Memory full.
Failed to export the report.
Not enough memory for operation. at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
The server who is running this application is a Dual Core AMD Opteron 2.61 ghz, 7 GB RAM
The framework version is 2.0 and the Crystal Reports dll version is 10.5.3700.0
Thanks.Hi,
If you are using IIS5 the give aspnet full permission to the Temp folders. For IIS6 give IIS_wpg permission.
For this you need to right click on the folder,
go to properties,
security tab,
click on Add,
Type aspnet/iis_wpg,
select top note in Location and click on check on check names.
Give full control and
click ok.
Also try using GC.Collect(), reportDocObject.Close() and reportDocObject.Dispose() as clean up code.
Regards,
AG. -
Problems reading some pdf files in Playbook
Hi
I have downloaded some PDF bus timetables and maps from the website of our local operator but found some problems in opening a few of the files -strange error messages or just grey screens
However I have just found that the app qPDF opens the "problem" files successfully
So maybe there is a problem with the Playbook version of Adobe or perhaps a problem with the latest OS...???
But anyway qPDF has got me to where I wanted to be
PeterI have had problems opening the same bus schedules Peter mentioned above. Most of the schedules on that companies routes open without problems with Adobe Reader.
I get an email notification of my cable bill. When I go to the website to open the Pdf bill, it only opens page 2 of the bill, page 1 is blank. Before the last update, my bill opened fully with Adobe Reader. I will be looking at qpgf -
Generated pdf file from oracle reports show bad characters
Hello all,
Iam fighting with a problem with generated pdf file from oracle reports which show some bad characters. I was searching for some information but it didnt help...
I have Oracle Database 11g R2 (or 10g R2) on Oracle Linux or Windows, Oracle forms and reports 6i (i know that is very old and not supported with 11gr2 but we are in this scenario).
NLS parameters are set like this
server:
NLS_CHARACTERSET EE8MSWIN1250
NLS_TERRITORY AMERICA
NLS_LANGUAGE AMERICAN
client:
NLS_CHARACTERSET EE8MSWIN1250
NLS_TERRITORY SLOVAK
NLS_LANGUAGE SLOVAKIA
When I run Oracle Reports it show perfect in display and when I try to print them, they are all good with good characters, but when I try to generate pdf file, some characters like č,š,ľ are not displaying corectly... This happen only when try to generate to pdf...
I try to work with uifont.ali on client side but without any result. Fonts for reports were installed on client and server side... Can someone help me with this problem? Thank you very much for every advice.
MartinHi Sergiusz,
Thank you for your reply. I look at what you wrote and try to make some test...
1) For first I download FontForge, which can generate type1 font from true type. So I open FontForge and open my Arial.ttf font and use "Generate Fonts" to save my Arial.ttf font to pfb and pfm (whoch are need to set in uifont.ali). I have to change encoding, because my font has 2byte encoding so I reecondode the font from ISO10646-1 to ISO8859-2 and generate to pfb.
2) Then I navigate REPORTS_PATH from regedit to my *.pfm and *.pfb files.
3) I add these lines to end of my uifont.ali
[ PDF:Embed ]
Arial = "Arial.pfm Arial.pfb"
ArialNarrow = "ArialNarrow.pfm ArialNarrow.pfb"
4) Then I generate my report but nothing change... I check "Font used" in my pdf file, but there were not my fonts embedded I guess..
I also try PDF:Subset, but it doesnt change anything... I try PDF aliasing to see if my uifont is working - this work very well, but I dont need to change font...
Any other advice? Thank you so much to everyone!
Martin -
I'm having problems opening my pdf files. I'm running wiondows Xp and have adobe reader XI(11.0.06) installed.
What kind of problems? What happens when you try? Any error messages?
-
having problems opening a pdf file with reader 10/11 get error msg cannot open close reader and try again any ideas
Hi George ,
Is it happening with all the PDF' or any specific one?
Could you please share the error message so that we can replicate at our end ?
Try repairing reader once and see if that fixes the issue.
Launch Reader>Navigate to Help>Repair Adobe Reader Installation
Regards
Sukrit Dhingra -
Problem in Reading a .PDF file
HI Friends,
I am reading a .pdf file from within java program using its java.io package.
I am able to read the file, but when I print the line read from file on to the screen, it all garbage. Its not in readable characters.
I guess its reagrding mismatch in Charcter Sets of original file and the stream with which I m reading the file.
So,if u know the solution plz suggest me.Hello Simple@java
Here's an exemple of a class that opens the File "rapport.pdf" located at the same place as the class.
Of course AcroRd32.exe is the name of Acrobat Reader which allows to read pdf files. You can get it on : adobe.com(http://www.adobe.com/products/acrobat/readstep2.html)
You will change "rapport.pdf" by the name of your pdf file.
Then execute "test()".
* Open the file "rapport.pdf"
public class test
public test()
Runtime a = Runtime.getRuntime();
try
a.exec("AcroRd32.exe rapport.pdf");
catch (Exception e)
System.out.println(e.getMessage());
Good luck ! -
D:\dzbat\bin>genpdf
D:\dzbat\bin>javadoc -doclet com.sun.tools.doclets.mif.MIFDoclet -docletpath d:\
mifdoclet1.2\lib\mifdoclet.jar -J-Xmx20M -batch dzbatcher -print pdf -d d:\lsmap
isericsson\docs -sourcepath d:\lsmapisericsson com.mahindrabt.lsm
Loading source files for package com.mahindrabt.lsm...
Constructing Javadoc information...
MIF Doclet version 1.2 beta 2 (build date: 09 Aug 2002)
I installed mifdoclet1.2 and DZbatcher and tried to generate PDF file with the following batch file
javadoc -doclet com.sun.tools.doclets.mif.MIFDoclet -docletpath d:\mifdoclet1.2\lib\mifdoclet.jar -J-Xmx20M -batch dzbatcher -print pdf -d d:\lsmapisericsson\docs -sourcepath d:\lsmapisericsson com.mahindrabt.lsm
It gives the following output and does not genrate the PDF file and does not give any error. Is there any problem with my batch file? Please help me out from this.
Generating d:\lsmapisericsson\docs\mif\overview.mif...
Using default stylemap file...
Template Used: d:\lsmapisericsson\docs\mif\template.mif
Using default batchmap file...
Building tree for all the packages and classes...
Generating d:\lsmapisericsson\docs\fm\package-list...
Generating d:\lsmapisericsson\docs\mif\com.mahindrabt.lsm.mif...
Generating default overview page...
Generating d:\lsmapisericsson\docs\mif\almanac.mif...
Generating d:\lsmapisericsson\docs\mif\api.book.mif...
Generating d:\lsmapisericsson\docs\mif\mif-to-fm.batch...
Executing: dzbatcher -makername framemaker d:\lsmapisericsson\docs\mif\mif-to-fm
.batch...
Regards
TusharI see no problem with your batch file, and the messages
proceed properly. To troubleshoot this further, I suggest
you read the email (currently adjacent) titled:
"Error using MIF doclet to create PDFs".
It describes several different approaches, including
generating PS and using Distiller to generate PDF,
or trying dzbatcher with -v option to echo each
command to see where it stops.
Please let us know your results, as this seems to be
a common problem.
-Doug Kramer
Javadoc team -
Error when Generate PDF File on SAP BW 7.3
Hello friends i have a problem.
I have a report that was built using the web designer deployed on Production Environment. This report has the option for print a PDF file but this process fail. I ran the SAP Support Desktop tool over SAP BW and i find the following error:
I followed this note and the notes internally but i don't find the solution (Parameters of timeout, checking the web service, etc...)
Aditionally i check the "fatal erros" on the NWA and i get 3 types of errors just when i generate the PDF:
The first:
Failed to allocate a connection due to an exception (the
full stack trace is logged below): org.omg.CORBA.COMM_FAILURE: vmcid: SUN
minor code: 2 completed: No
The second:
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 2
completed: No
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 2 completed: No
at
com.sap.engine.services.iiop.server.portable.Delegate.invoke(Delegate.java:179)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at
com.adobe.service._ControlAgentStub.setLogLevel(_ControlAgentStub.java:22)
at
com.adobe.service.ProcessResource.allocateConnection(ProcessResource.java:572)
at
com.adobe.service.ConnectionResource.getConnection(ConnectionResource.java:39)
at
com.adobe.service.J2EEConnectionFactoryManagerPeerImpl.getConnection(J2EEConnectionFactoryManagerPeerImpl.java:117)
at com.adobe.ads.remote.ConnectionFactoryHandler.getConnection(Unknown
Source)
at com.adobe.ads.remote.EJB_XMLFormAgent.getConnection(Unknown
Source)
at com.adobe.ads.remote.EJB_XMLFormAgent.renderAll(Unknown Source)
at com.adobe.ads.operation.support.RemoteRenderer.renderAllRemote(Unknown
Source)
at com.adobe.ads.operation.support.RemoteRenderer.renderAll(Unknown
Source)
at com.adobe.ads.operation.support.RemoteRenderer.renderAll(Unknown
Source)
at com.adobe.ads.operation.Render.renderWithoutCache(Unknown Source)
at com.adobe.ads.operation.Render.execute(Unknown Source)
at
com.adobe.ads.operation.ADSOperation.doWork(Unknown Source)
at
com.adobe.ads.request.ADSRequest.processOperations(Unknown Source)
at
com.adobe.ads.request.ADSRequest.process(Unknown Source)
at
com.adobe.AdobeDocumentServicesEJB.processRequest(Unknown Source)
at
com.adobe.AdobeDocumentServicesEJB.rpData(Unknown Source)
at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:47)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:50)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:37)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:21)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_MethodRetry.invoke(Interceptors_MethodRetry.java:46)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sap.engine.services.ejb3.util.BeanMethods.executeReflectMethod(BeanMethods.java:314)
at
com.sap.engine.services.ejb3.jacc.ExecuteMethodPrivilegedAction.run(ExecuteMethodPrivilegedAction.java:38)
at java.security.AccessController.doPrivileged(Native Method)
at
javax.security.auth.Subject.doAs(Subject.java:396)
at
com.sap.engine.services.ejb3.jacc.ContainerJ2EESecurityProviderBaseImpl.doAs(ContainerJ2EESecurityProviderBaseImpl.java:262)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_RunAs.invoke(Interceptors_RunAs.java:24)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:25)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:17)
at
com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
at
com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:138)
at
com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:204)
at
com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:710)
at
com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:662)
at
com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:322)
at
com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:199)
at
com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:65)
at
com.sap.engine.services.webservices.servlet.SoapServlet.doPost(SoapServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
at
com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:38)
at
com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:457)
at
com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
at
com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
at
com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
at
com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:276)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at
com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at
com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
at
com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
at
com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at
com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
The Third and the last
Exception thrown:
com.sap.ip.bi.base.exception.BIBaseRuntimeException: EXPORT XFA exception when
calling the PDF object after 8882
msec
com.sap.ip.bi.base.exception.BIBaseRuntimeException: EXPORT XFA
exception when calling the PDF object after 8882 msec
at
com.sap.ip.bi.export.xfa.impl.Document.provideContentStream(Document.java:279)
at
com.sap.ip.bi.export.xfa.impl.Document.writeDocumentToByte(Document.java:527)
at
com.sap.ip.bi.export.xfa.impl.PDFConverter.getBinaryResultContainer(PDFConverter.java:183)
at
com.sap.ip.bi.export.impl.ExportController.getBinaryResultContainer(ExportController.java:537)
at
com.sap.ip.bi.export.controller.ExportResult.getExportResult(ExportResult.java:83)
at
com.sap.ip.bi.export.controller.ExportResult.createExport(ExportResult.java:70)
at
com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.createPDF(PageExportRenderingRootNode.java:556)
at
com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.doExport(PageExportRenderingRootNode.java:142)
at
com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.processRendering(PageExportRenderingRootNode.java:389)
at
com.sap.ip.bi.webapplications.pageexport.impl.PageExportRenderingRootNode.processSnippetRendering(PageExportRenderingRootNode.java:274)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page.buildRenderingTree(Page.java:1299)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRenderingRootNode(Page.java:4780)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRendering(Page.java:4746)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page.doProcessRequest(Page.java:2750)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page._processRequest(Page.java:714)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRequest(Page.java:4802)
at
com.sap.ip.bi.webapplications.runtime.impl.page.Page.processRequest(Page.java:4795)
at
com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.doProcessRequest(Controller.java:1191)
at
com.sap.ip.bi.webapplications.runtime.impl.controller.Controller._processRequest(Controller.java:1047)
at
com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.processRequest(Controller.java:1015)
at
com.sap.ip.bi.webapplications.runtime.impl.controller.Controller.processRequest(Controller.java:72)
at
com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService._handleRequest(BIRuntimeService.java:446)
at
com.sap.ip.bi.webapplications.runtime.jsp.portal.services.BIRuntimeService.handleRequest(BIRuntimeService.java:362)
at
com.sap.ip.bi.webapplications.runtime.jsp.portal.components.LauncherComponent.doContent(LauncherComponent.java:26)
at
com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:213)
at
com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:129)
at
com.sap.portal.prt.core.RequestDispatcherFactory$PortalComponentRequestDispatcher$5.service(RequestDispatcherFactory.java:308)
at
com.sap.engine.services.servlets_jsp.server.deploy.impl.module.IRequestDispatcherImpl.dispatch(IRequestDispatcherImpl.java:270)
at
com.sap.portal.prt.core.RequestDispatcherFactory$PortalComponentRequestDispatcher.service(RequestDispatcherFactory.java:298)
at
com.sap.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:229)
at
com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:107)
at
com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:141)
at
com.sap.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:206)
at com.sap.portal.prt.pom.PortalNode.service(PortalNode.java:588)
at
com.sap.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:233)
at
com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:107)
at
com.sap.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:141)
at
com.sap.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:520)
at
com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:201)
at
com.sap.portal.prt.dispatcher.DispatcherServlet.service(DispatcherServlet.java:132)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at
com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:202)
at
com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:103)
at
com.sap.portal.http.EnrichNavRequestFilter.doFilter(EnrichNavRequestFilter.java:49)
at
com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at
com.sap.portal.http.EnrichNavRequestFilter.doFilter(EnrichNavRequestFilter.java:49)
at
com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:79)
at
com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:432)
at
com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
at
com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
at
com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
at
com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:276)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at
com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at
com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
at
com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at
com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at
com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:475)
at
com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:269)
at
com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at
com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)
Caused by:
com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument
Processor failed to process RenderRequest Due to the following Reason
Server
Exception: javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.SOAPFaultException:
javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.
at
com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
at
com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentCreationContext.execute(PDFDocumentCreationContext.java:183)
at
com.sap.tc.adobe.pdfdocument.impl.PDFCreationContextImpl.execute(PDFCreationContextImpl.java:103)
at
com.sap.ip.bi.export.xfa.impl.Document.provideContentStream(Document.java:225)
... 83 more
Caused by:
com.sap.tc.adobe.pdfobject.base.core.PDFObjectRuntimeException: Server
Exception: javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.SOAPFaultException:
javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.
at
com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.invoke(PDFObjectDII.java:381)
at
com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.doSoapCall(PDFObjectDII.java:91)
at
com.sap.tc.adobe.pdfobject.base.core.PDFObject.execute(PDFObject.java:111)
at
com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentRenderHandler.handle(PDFDocumentRenderHandler.java:176)
at
com.sap.tc.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
... 86 more
Caused by: java.rmi.ServerException: Server Exception:
javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.SOAPFaultException:
javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.processFault(SOAPTransportBinding.java:2075)
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call_SOAP(SOAPTransportBinding.java:1416)
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.callWOLogging(SOAPTransportBinding.java:991)
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.call(SOAPTransportBinding.java:945)
at
com.sap.engine.services.webservices.espbase.client.dynamic.impl.DInterfaceInvokerImpl.invokeOperation(DInterfaceInvokerImpl.java:76)
at
com.sap.tc.adobe.pdfobject.base.core.PDFObjectDII.invoke(PDFObjectDII.java:328)
... 90 more
Caused by:
com.sap.engine.services.webservices.jaxrpc.exceptions.SOAPFaultException:
javax.ejb.EJBException: nested exception is:
javax.transaction.RollbackException: Transaction:with ID 43783 will be
rolledback because resource manager RM com.adobe.service.ResourcePeerImpl was
not able to prepare its transaction branch. Returned result from prepare is
TMFAIL.
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.FaultUtil.buildFaultException_SOAP11(FaultUtil.java:225)
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.FaultUtil.buildFaultException(FaultUtil.java:65)
at
com.sap.engine.services.webservices.espbase.client.bindings.impl.SOAPTransportBinding.processFault(SOAPTransportBinding.java:2031)
... 95 more
Finally i compare the environments (Production, Dev and QAS) and in DEV and QAS this report works perfectly (generate PDF file correctly). I compare configurations of them and they have the same parameters and values.
The Support Desktop tools set on green all (DEV and QAS)
I found an article about the ADS rfc that use the adobe document service, so i check in the environment production and this doesn't exists (using SM59). I check in the environments DEV and QAS and this doesn't exists, but in both evironments appears just "ADS is enabled" and works perfectly.
I tried to execute the program test of PDF's (FP_TEST_IA_01 and FP_TEST_00) on the three environments and not working on all.
Please help me with this, i am crazy with this!!!
Thanks and greetings.
AlexHi Alex,
follow up as per Note:
1052659
See defaultTrace.trc and create SAP customer message if needed.
cheers
m./ -
We have done toleration testing on firefox version 5 thru 6 and haven't got an issue with our website generating pdf files for our users. One of our users upgraded to firefox version 7.0.1 and they tried to generate a pdf report, now a screen pops up with Corrupted Content Error The page you are trying to view cannot be shown because an error in the data transmission was detected. I recreated this issue on my pc yesterday by installing firefox 7.0.1. Any hints as to what I need to look at would help. Cannot provide the url because it is a secure website for law enforcement. Thanks.
You can turn off compatibility checking, but more and more of the Google Toolbar will not work. Google is no longer supporting the Google Toolbar so you should use the alternatives.
Hi Mark,
See http://kb.mozillazine.org/Using_Google_Toolbar_features_without_toolbars
If you have an aspect that is not covered, indicate what that is; otherwise, expect you to be fully functional within 1-2 weeks.
<br><small>Please mark "Solved" one answer that will best help others with a similar problem -- hope this was it.</small> -
Problem with opening PDF files in Google Chrome browser
We have a web page displaying links to dynamically generated PDF files located on the internal repository. This files are not just text PDF files but PDF forms created using XFA technology. This means that they must be opened and filled only in Adobe Reader and not in Foxit Reader or browser's built-in PDF viewer.
Now, the problem is that a Google Chrome browser opens any PDF file using its own PDF viewer. And I want to force this browser to open PDF files in Adobe Reader.
How can I achieve this without disabling 'Chrome PDF Viewer' plugin since I can't do this for all users of our web site?
Any help or advice would be greatly appreciated.
P.S. We use LiveCycle ES3.Each user would have to set each browser individually.
Note: I don't think it's possible to set the default PDF viewer with code for every user who visits the site.
See the following link to enable Adobe Reader as the default PDF viewer in different browsers:
http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html
Note: Not all PDF viewer browser plug-ins support PDF submissions, and most 3rd party viewers may not support forms created with LiveCycle or forms with Extended Reader Rights enabled. -
Indesign-generated .pdf files won't print
I realize this question is vague to the point of being unanswerable, but here I go anyway.
Our department's publication person sent me a number of chapters of our book in progress so that I could print an uncorrected proof to show to our funding source. She emailed me .pdf files generated by InDesign CS2, probably, although it might have been CS3.
She also emailed me the indesign file for the frontmatter because I had some things to add, so the .pdf for that I generated myself.
I took everything to a local printer we regularly use. To print this job he was using a large commercial Canon setup I think. None of the .pdfs would print on it. He ended up having to print them all as images for the purposes of creating a proof for me.
Now, I printed all of them myself on our networked postscript printer, both from a Mac and a Windows machine, no problem.
Since the files had been emailed to me, and then to him, we thought maybe they got corrupted, so I brought them over on a disk, but that didn't help, not even the one file whose .pdf I generated myself would print.
So is this an issue that has come up--indesign-generated .pdf files being unprintable on a commercial printer but printable on a postscript machine.Dov and Al,
Yes, I'm sorry, I do realize that this isn't enough to diagnose a problem. I was hoping that this might be something that has come up before and someone would recognize.
As far as I could tell, he was opening up the print jobs in Acrobat and sending them to his printer, which had its own job monitor. When he consulted that monitor he just said, no, it won't print.
He's a smart guy and I've done a number of jobs with him that were generated in indesign, so I'm really at a loss to explain what has gone wrong with this one. -
Problem with preview PDF files on Windows 7 32bit
Hello,
in my office I have a problem with preview PDF files on my computers. The files are allright, but if I select a file and click on preview mode after ~ 10sec operation system write something "Preview this file is corrupt for PDF Preview Handler wrong". On other 64bit computers with same programs the preview is work. I try uninstall all Adobe soft (Reader, Flash), clean all Adobe data from folders in root and in register, but it is not solve this problem. On Microsoft forums wrote me, that the problem is probably with AR plugin.
So, can someone help me?
Config PC:
Windows 7 32/64bit Pro
Intel i3, 4GB
Adobe Reader 11.0.5
Adobe Flash Player 15 ActiveX
Adobe Flash Player 15 plugin
Preview Handler Surrogate Host ver.: 6.1.7601.17514
Thank you for help.I think I figured it out after reading other forums. Thanks!
-
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
Maybe you are looking for
-
HT204053 2 devices - 1 icloud account issues; importing data to Iphone 6
I have an Iphone 4G and ipad which was sharing 1 icloud account . Big mistake! Because, the storage space was insufficient for both devices' data, I stopped backing up any more data into the icloud. Now I bought a new Iphone 6 and am wondering how I
-
HT5557 How do i get it to play a book?
I cant get my ibook to play a book I know not all books play but the one I have said it had it
-
Can't pair iphone 5 to mac mini
help
-
When trying to transfer purchases from iPhone 4s I get the following error message: "
When I try and transfer purchases from my iPhone I get the following error message: "Attempting to copy to the disk 'DATA' failed. The device timed out." I have recently moved my iTunes Media folder to my D:// drive and can still access music and tv
-
My website was migrated to a new cloud server last week and after the move visitors to my site using Firefox have been intermittently receiving the following error when visiting a https:// url. Secure Connection Failed An error occurred during a conn