Forum Replies Created
-
AuthorPosts
-
in reply to: Radio Buttons February 2, 2010 at 14:06#27829
The 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#p500in 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: Possible security hole in pd4ml February 2, 2010 at 15:44in reply to: Base URL Issue February 2, 2010 at 15:49#27831The css and images are stored root web folder like “/images/image.png”.
How can this be resolved?
in reply to: Deployment / Configuration issues February 3, 2010 at 19:49#26328Hi,
I am using the java version of pd4ml pro with command line execution on unix.
I have modified to pd4browser.properties file for page fomat LETTER.
..
page.format=LETTERBut it seems not considered for conversion – the pdf ouput is still in A4.
Could it be a path issue? The properties file is in the same directory as the pd4ml.jar file. Input Html file and the calling Perl script are in different directories.
Thanks!
in reply to: PD4ML Tips & Tricks February 4, 2010 at 10:44#26329I want to save PDF file directly in to the server (folder). on that time it will open a pop up to save file in to client browser.
I have seen solution on http://pd4ml.com/php.htm ,
”
If you need a generated PDF not to be sent to clients browser, but saved to the disk, add ‘ >/generated/file/location/file.pdf’ command-line redirect and remove header(‘Content-type: application/pdf’); directive in pd4ml.php.
”
Please explain me briefly that where i Add ‘>/generated/file/location/file.pdf’ (on which file).Thanks in Advance.
AKMin 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:
[language=Java:6rer4axl]java -jar pd4ml.jar -config /path/filename.properties file:/path/template.htm /path/out.pdf[/language:6rer4axl]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: PD4ML Tips & Tricks February 5, 2010 at 06:49#26327Hello Team,
First i say thanks to all your team to reply my query for previous topic.
Now when integrate PD4ml Pdf Generation Concept on my live server then an Error Is occurred: “Unhandled MIME type: “application/octet-stream” . I have use Linux server.
and write following code in to pd4ml.php
if ($_SERVER["HTTPS"] != "on") { // MS IE needs to cache PDF obtained by HTTPS. header('Pragma: no-cache'); header('Expires: -10000'); } if (array_key_exists('url', $_POST)) { /*$rootDir = 'http://localhost/html_to_pdf/pd4ml_php_wrapper'; $myad = 'notepad_desien.pdf'; $fullPath = ($rootDir . '/' . $myad); */ header('Content-type: application/pdf'); //header('Content-type:application/pdf:pdf:PDF file'); //header('Content-type:application/x-pdf:pdf:PDF file'); //header('Content-disposition: inline'); header('Content-disposition: attachment; filename=notepad.pdf'); //header('Content-Disposition: attachment; filename=' . $fullPath); //readfile($fullPath); // Make sure that web user is allowed to write to ./stderr.txt. If not, please remove '2>stderr.txt’ commend line suffix
// UNIX version
passthru(‘java -Xmx512m -Djava.awt.headless=true -cp .:pd4ml_demo.jar Pd4Php ” . $_POST . ” 840 A4 -ttf ./fonts 2>>stderr.txt’);
// Windows version
//passthru(‘java -Xmx512m -cp .;pd4ml_demo.jar Pd4Php ‘ . $_POST . ‘ 800 A4’);} else {
echo ‘invalid usage’;
}
?>Please Reply me ASAP.
Thanks in advance.
AKM
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: General questions / FAQ February 9, 2010 at 14:24#26330Does PD4ML support font suitcases on a Mac? I’m trying to access fonts, but they are stored in suitcases, and so far, I am not having any success in using these fonts.
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: Font Suitcase Support on Mac? February 9, 2010 at 14:52#27845Thanks. I know that I can extract the fonts, but that adds overhead to the installation. The site is using font managing software that wraps fonts in suitcases.
If you are interested in adding suitcase support, you may want to take a look at Fondu (http://fondu.sourceforge.net/)in reply to: Base URL Issue February 9, 2010 at 20:30#27833For now, modifying the html with the following works to remove the leading slash
[language=java:2cbj9nop]data = data.replaceAll(“src=”/images/”, “src=”images/”);
data = data.replaceAll(“href=”/style/”, “href=”style/”);[/language:2cbj9nop]
and the following javascript in the page will set a ‘checked’ into the html[language=Java:2cbj9nop]function processFormData(oForm) {
var e, i = 0;
while (e = oForm.elements[i++]) {
if (e.type == 'checkbox') {
if (e.checked == true) {
e.defaultChecked = true;
} else {
e.defaultChecked = false;
}
}
if (e.type == 'radio') {
var x = e.name;
if (e.checked == true) {
e.defaultChecked = true;
} else {
e.defaultChecked = false;
}
}
}
}[/language:2cbj9nop]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.
-
AuthorPosts