Forum Replies Created
-
AuthorPosts
-
in reply to: Deploy in .net 2.0 February 17, 2010 at 16:52#27857
This is most likely happening because there is some stray HTML being output after/before the PDF stream is getting created.
I would recommend to save PDF to the hard drive and to open it with a text editor. Make sure it starts with %PDF-1.4 and ends with %%EOF
in reply to: sometimes I get a MalformedURLException, and sometimes not February 17, 2010 at 09:20#27855There is a big probability the exception is thrown before PD4ML takes control.
To make sure, try to switch PD4ML debug on: pd4ml.enableDebugInfo()Are there any error messages or exception stack traces in server’s log?
in reply to: How to debug IllegalArgumentException February 16, 2010 at 21:45#27854Obviously the exception is thrown in the standard JDK classes and the “problem” method (sun.net.www.protocol.file.Handler.openConnection (Handler.java:55)) has anything to do with URL connections.
A good strategy in the case would be to switch PD4Ml debug on (pd4ml.enableDebugInfo()) and to inspect STDOUT (or server’s log) for the last URL it tried to connect.
in reply to: CSS in the header February 16, 2010 at 21:35#27849It is easy to mix different methods to define HTML headers in PD4ML.
So first please take a look to the following topic:
html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41.htmlIn the code
<pd4ml:page.header scope="2+"> <%=myVar%> </pd4ml:page.header>
<%=myVar%>will be substituted with myVar value before the document is passed to PD4ML. So from PD4ML perspective it is going to be a static text (value). The only variable dynamically changes its value from page to page is $[page]To define different headers for different pages you need to do something like that:
<pd4ml:page.header scope="2"> <%=myVar%> </pd4ml:page.header> <pd4ml:page.header scope="3-5"> <%=myAnotherVar%> </pd4ml:page.header> <pd4ml:page.header scope="6+"> yet another var or static text </pd4ml:page.header>
in reply to: CSS in the header February 16, 2010 at 18:34#27847Yes. For example try to define the header like that:
<div style="width: 100%; background-color: tomato"> Header text: $[page] of $[total] </div>
in reply to: External stylesheets by LINK tag – not evaluated at all? February 11, 2010 at 21:08#27853> The code is being run on mightysite.dom itself and it is known to itself.
It is a usual situation a server is behind the firewall, and its external name (like myserver.com) is known only to reverse proxy. In the corporative internet the server appears under a “cryptic” no-way-to-remember name.
But you are right: if it loads the images, it is not an issue for your environment.
The debug output should give you a clue if it tries to load any CSS at all.
Also a severe syntax error in CSS may fail the entire stylesheet – you’ll find traces of that (if any) in the log file.
in reply to: External stylesheets by LINK tag – not evaluated at all? February 11, 2010 at 17:59#27851First I would switch debug info on (pd4ml.enableDebugInfo()) and inspect the stdout or server’s log.
Please make sure that mightysite.dom alias(?) is known to the server (not only to your web-browser): try to traceroute/ping/http to mightysite.dom from the server, where your PD4ML-enabled application is located.
in reply to: Base URL Issue February 10, 2010 at 14:01#27834I am afraid the trick with JavaScript is not going to work. PD4ML does not support JavaScript. The source HTML should already have “CHECKED” attributes on their places.
in reply to: Font Suitcase Support on Mac? February 10, 2010 at 13:58#27846Thank you for the hint! We’ll check if there is an easy way to add an optional support for the suitcases.
in reply to: Font Suitcase Support on Mac? February 9, 2010 at 14:35#27844PD4ML does not support font suitcases, so you need to use third-party tools to extract TTFs from there. I googled – there are many of such tools.
On MacOSX you should not have such problem as long as the fonts are located as regular TTF or OTF files in /Library/Fonts directory.
in reply to: Eroor in PDF Genration: February 5, 2010 at 15:08#27841Obviously the problem is caused not by PD4ML, but by the server configuration.
Hopefully the info from the page will help:
http://www.linuxquestions.org/questions/linux-software-2/unhandled-mime-type-applicationoctet-stream-651502/in reply to: Base URL Issue February 4, 2010 at 15:59#27832An information regarding the mapping of the root web folder to the physical file system is known only to the web application container. So the container/server should be somehow taken into the path resolving. There are two methods:
- Request the resources via HTTP. In your case it is going to be a definition of URL base = new URL(“http://yourserver/”);
- Let PD4ML to talk to the server directly with pd4ml.useServletContext(ServletContext ctx)
in reply to: pd4browser.properties file settings not working February 4, 2010 at 15:49#27842First try to make sure it is not the config file path issue. You may define an explicit config file location with “-config filename.properties” parameter.
Example:
java -jar pd4ml.jar -config /path/filename.properties file:/path/template.htm /path/out.pdfin reply to: Base URL Issue February 2, 2010 at 14:09#27830URL base = new URL("file:/g:/acme/web);should work if the image SRC defined as “images/image.png”, not as “/images/image.png”
in reply to: Radio Buttons February 2, 2010 at 14:06#27829The server-side should care the HTML includes the checked state like
<INPUT name="ACCOUNT_TYPE" type="radio" VALUE="2" CHECKED>
before the document passed to PD4ML.However I may imagine the CHECKED keyword is expected by missing there bacause of the session ID is not passed to PD4ML with the HTML template URL. The following info may help:
post416.html#p500 -
AuthorPosts
