Forum Replies Created
-
AuthorPosts
-
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 21, 2012 at 14:16#28955
Sorry for the delay, I hadn’t gone to sleep, I was on holiday.
Thanks for your continuing help.The following command produced a nice pdf:
java -Xmx512m -Djava.awt.headless=true -cp ./pd4ml.jar Pd4Cmd 'https://pd4ml.com' 1200 LETTER -bookmarks HEADINGS -pdfforms -debug -out /tmp/pd4ml.pdfThe only question is: why doesn’t it produce anything from Tomcat6 (which is also headless)? We get nothing from either API calls or tags
in reply to: Question about header areaHeight May 16, 2012 at 00:28in reply to: Anybody had problems with PD4ML on Lion for Mac? May 7, 2012 at 15:45#28953My colleague who also has just installed Lion has the same problem, exactly the same.
I have tried updating to 3.8.0fx4 but it made no difference.
in reply to: Anybody had problems with PD4ML on Lion for Mac? May 7, 2012 at 08:29in reply to: Not required page break May 1, 2012 at 10:03in reply to: Anybody had problems with PD4ML on Lion for Mac? April 30, 2012 at 09:05#28950P.S. There have never been any messages at all in my Tomcat stdout and stderr logs. Complete silence. And any calls to pd4ml just hang forever, without timeout.
My Lion update was quick and practically painless, which was perhaps too good to be true. I’ve had no problems at all with any other programmes.
Presumably something is missing, however. PD4ML doesn’t depend on any system graphics does it?
in reply to: Anybody had problems with PD4ML on Lion for Mac? April 30, 2012 at 08:54#28949Thanks for your help.
I’ve been trying to run the command-line pd4ml class but whatever I do I get:
java.io.IOException: Cannot run program "/Applications/Preview.app": error=13, Permission deniedI’ve created a folder with completely open permissions to everyone, and I run the pd4ml class from there.
I also changed the permissions for the Mac preview app so that it has permissions to be run by any user.The pd4ml class will open and show my simple html file when I press GO.
But will not create a .pdf when I press PDF – for the reason shown above.in reply to: Anybody had problems with PD4ML on Lion for Mac? April 27, 2012 at 15:21#28944Please help, someone.
Presumably something is simply missing, but there are no log messages at all to give an idea. Probably the Lion idea is a red herring.
I did a complete reinstall of Snow Leopard a couple of weeks before updating to Lion and it may have happened then.Here’s a very simple test below. The code is correct, of that I’m certain.
The debug just prints out “version: PD4ML 380 Pro” and then it all hangs….All the correct .jars are on the classpath- I currently have:
pd4ml-3.8.0.jar
pd4mlDefaultFonts-1.0.jar
ss_css2.jar
pd4ml_tl.jarAny help would be very gratefully received.
<%@page import="org.zefer.pd4ml.PD4Constants" %><%@ taglib uri="https://pd4ml.com/tlds/pd4ml/2.6" prefix="pd4ml" %><%@page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%><pd4ml:transform pageFormat="A4" pageOrientation="portrait" screenWidth="700" pageInsets="10,50,20,50,points" debug="true"> <html> <head> </head> <body> hello </body> </html> </pd4ml:transform>
in reply to: Spanish charset printing problem April 26, 2012 at 09:32#28979This is the output on STDOUT:-
version: PD4ML 351b8 new parse attempt with: UTF8 image not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/ca_state_logo.png not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/ca_state_logo.png image size: 70777 can not embed file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/ca_state_logo.png. Not embeddable color type. Reformatting image... image not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/sign.png not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/sign.png image size: 264 can not embed file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/sign.png. Not embeddable color type. Reformatting image... image not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/Julie_signature.gif not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/Julie_signature.gif image size: 2770 image not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/Entertainment.png not yet in cache: file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/Entertainment.png image size: 1104 PNG marker: sRGB PNG marker: gAMA PNG marker: cHRM can not embed file:F:/Tomcat_DIR/jakarta-tomcat-5.0.19/webapps/ewpmc/temp/invoicehtml/images/Entertainment.png. PNG should not have more than 256 colors. Reformatting image... image not yet in cache: java:/resources/icons/spacer.gif not yet in cache: java:/resources/icons/spacer.gif image size: 48 done in 2126ms. PDF generation done. pdfFile1: F:Tomcat_DIRjakarta-tomcat-5.0.19webappsewpmctempinvoicepdfGC-áá-329703-04112012.pdf version: PD4ML 351b8 new parse attempt with: UTF8 done in 340ms.
in reply to: pdf is blank April 25, 2012 at 10:43#28943hi,
thanks for the reply I am using the following php code below
$var = "java_path -Xmx512m -Djava.awt.headless=true -cp jar_path Pd4Cmd html_path 800 A4"; passthru($var);
the pdf is created but when we try to open it, there is no content just a blank/white space.
this happen when we try to generate a pdf from the html in our domain where the pd4ml files is also hosted, but if I try to change the html using from other domain it works.
in reply to: Spanish charset printing problem April 24, 2012 at 06:40#28977Hi,
Thanks for your help.
I tried this , but it is not working for some reason
here is my code
java.io.FileOutputStream fos = new java.io.FileOutputStream(outputPDFFile); PD4ML pd4ml = new PD4ML(); pd4ml.setPageInsets(new Insets(0, 0, 0, 0)); pd4ml.setHtmlWidth(950); pd4ml.setPageSize(pd4ml.changePageOrientation(format)); // landscape page orientation pd4ml.setPageSize(format); // portrait page orientation pd4ml.useTTF("java:fonts", true); pd4ml.setDefaultTTFs("Times New Roman", "Arial", "Courier New"); if ( headerBody != null && headerBody.length() > 0 ) { PD4PageMark header = new PD4PageMark(); header.setAreaHeight( -1 ); // autocompute header.setHtmlTemplate( headerBody ); // autocompute pd4ml.setPageHeader( header ); } pd4ml.enableDebugInfo(); pd4ml.render("file:" + inputHTMLFileName, fos); if(fos!=null){ outputPDFFile = null; fos.close(); }Please suggest me any other solution.
Thanksin reply to: Anybody had problems with PD4ML on Lion for Mac? April 24, 2012 at 05:46#28947The JDK works fine, I use it for Tomcat, Spring and work with it as usual. It’s also been updated automatically a couple of times since I got Lion.
in reply to: Anybody had problems with PD4ML on Lion for Mac? April 20, 2012 at 15:12#28945Could it be a 64-Bit issue?
in reply to: Rendering and HTML to PDF April 18, 2012 at 03:42#28940Here is HTML file I was use for test
<html> <head> </head> <body> <select id="S1" name="S1"> <option value="Item1" selected="selected">Item1</option> <option value="Item2">Item2</option> <option value="Item3">Item3</option> <option value="Item4">Item4</option> </select> Text Box <input id="ia1" size="16" name="ia1" /> <input style="visibility:visible;" id="C1" value="Yes" type="checkbox" name="C1" />Check 1 <input id="C2" value="Yes" type="checkbox" name="C2" />Check 2 <input id="C3" value="Yes" type="checkbox" name="C3" />Check 3 <input id="R1" value="1" checked="checked" type="radio" name="G" />R1 <input id="R2" value="2" type="radio" name="G" />R2 <input id="R3" value="3" type="radio" name="G" />R3 <textarea style="width: 364px; height: 77px; overflow: hidden" id="TA" rows="4" cols="43" name="TA"></textarea> </body> </html>
in reply to: Zero-width spaces April 18, 2012 at 01:22#28920Could I please have a response to this, even if its a request for me to provide more information?
-
AuthorPosts
