Forum Replies Created
-
AuthorPosts
-
#29780
Well, something does not sound right.
I replaced the old pd4ml_tl.jar with the new pd4ml_tl_demo.jar. I also updated the pd4ml.tldWhen I tested my simple test, this time too, the screen was blank and no errors. I also tested the index.jsp that came with the download and even that was showing 2 blank pages.
Am I missing something? or the Websphere 8.x on Eclipse some how is not making this work?
Thanks#29781Sorry, my bad, I forgot to replace pd4ml_demo.jar with the original one. I will test again and update here.
#29782No, it is not working even now; I get blank PDF’s without any error.
I downloaded the demo jars from trial version 3.9.8b1Any clue what is causing this problem? Thanks
#29783With Internet Explorer and Chrome, it come blank.
If I try with Firefox, it comes blank but it does give some warning like ‘This PDF document might not be displayed correctly.#29784OK, please do the following.
Temporarily add enable=”false” attribute to
<pd4ml:transform>and open the page in a web browser. It should return HTML. Save the HTML.Remove the attribute and generate a PDF (it is blank, according to your report). Save it.
Please send the both docs to support pd4ml com
in reply to: HTML/CSS rendering issues July 2, 2015 at 17:04#27031I am chasing an issue where PD4ML is not able to fetch https images. We are using PD4ML 380fx6 Pro from a tomcat environment. Based on previous posts, my theory is that I need to create a class for pd4ml.extra.resource.loaders.
Using the sample on this board, I have created my own com.mycompany.utilities.PD4MLCustomFileResourceProvider.class. I have also added the code to add this as the DynamicParams.
HashMap map = new HashMap();<br /> map.put( "pd4ml.extra.resource.loaders", "PD4MLCustomFileResourceProvider" );<br /> pd4ml.setDynamicParams(map);<br /> pd4ml.enableDebugInfo();<br /> pd4ml.render(sr, os);But when I run the code, I see in the logs:
version: PD4ML 380fx6 Pro
image not yet in cache: http://www.google.com/images/srpr/logo11w.png
not yet in cache: http://www.google.com/images/srpr/logo11w.png
External resource loader: PD4MLCustomFileResourceProvider not found. Make sure “pd4ml.extra.resource.loaders” value is correct
External resource loader: PD4MLCustomFileResourceProvider not found. Make sure “pd4ml.extra.resource.loaders” value is correct
image size: 14022Do I need to include the package information in the Map?
TIA!
Steve B.in reply to: HTML/CSS rendering issues July 2, 2015 at 17:16#27032Reading this forum, I have learned about the ability to create a custom resource loader. In a separate post, I am trying to make the examples work in my environment. Assuming I get the sample working, I have questions on how this fits into my current environment.
My belief is that I only need a custom loader to handle the loading of https resources; any other resource (http, relative-paths, local-resources, etc.) I would like to allow PD4ML to use its standard processing. So my question is, can I add a custom loader just for https resources? If not, is there a way from my code to call the pd4ml-resource-loader? ie:
<br /> if (resource.startsWith("https")){<br /> // my processing code here...<br /> } else {<br /> // something like super.getResourceAsBytes(resource, debug);<br /> }TIA,
Steve B.
in reply to: PD4ML Tips & Tricks July 3, 2015 at 07:38#27033Hi,
i am using the below code to generate pdf,but my data is getting truncated.i.e last line of the first page and first line of the next page are not displayed.Can i get a solution that my content is not lost and is displayed properly???
public void printPDF(InputStream in, String uen, String loginId,
String coTransNo, String coTransId) {
try {
File j =
File.createTempFile(SharesConstants.TEMP_FILE, SharesConstants.DOT_PDF,
null);
java.io.FileOutputStream fos = new FileOutputStream(j);
OutputStream sos = System.out;InputStreamReader isr =
new InputStreamReader(in, SharesConstants.UTF_8);
PD4ML pd4ml = new PD4ML();pd4ml.getLastRenderInfo(PD4Constants.PD4ML_TOTAL_PAGES);
try {
pd4ml.enableImgSplit(Boolean.FALSE);
pd4ml.setPageSize(SharesConstants.PDF_LAND_SCAPE_VALUE ?
pd4ml.changePageOrientation(PDF_FORMAT) :
PDF_FORMAT);
} catch (Exception e) {
e.printStackTrace();
}
if (SharesConstants.PDF_UNITS_VALUE.equals(SharesConstants.MM)) {
pd4ml.setPageInsetsMM(new Insets(SharesConstants.PDF_TOP_VALUE,
SharesConstants.PDF_LEFT_VALUE,
SharesConstants.PDF_BOTTOM_VALUE,
SharesConstants.PDF_RIGHT_VALUE));
} else {
pd4ml.setPageInsets(new Insets(SharesConstants.PDF_TOP_VALUE,
SharesConstants.PDF_LEFT_VALUE,
SharesConstants.PDF_BOTTOM_VALUE,
SharesConstants.PDF_RIGHT_VALUE));
}
pd4ml.setHtmlWidth(SharesConstants.PDF_USER_SPACE_WIDTH);pd4ml.render(isr, fos);
pd4ml.enableSmartTableBreaks(true);
pd4ml.addStyle(“BODY, DIV, TD { word-wrap: break-word }”, true);if (convertToBlobAndPersistTxn(j, uen, loginId, coTransNo,coTransId)) {
} else {
}
j.deleteOnExit();
} catch (Exception e) {e.printStackTrace();
}
}#29785Thanks. I was busy until today, so could not get back.
I just now sent an email as you suggested and hopefully we can figure out and fix the problem soon. Thanks again#29786Hi PD4ML,
I sent the email to you (support at pd4ml dot com) regarding the blank PDF problem along with attachments.
Did you guys find any problem in my code and any work around solution to fix the problem?Thanks and I appreciate your help.
#29787Yes, we received the files. Thank you!
The sample HTML is quite simple and it should not cause any problems with conversion. We’ve been analyzing what could be an issue reason.
BTW: you did not send a blank PDF sample for the doc. Could you please send it?
Or under “blank PDF” you meant a blank browser frame (no PDF, no PDF viewer plugin)?
#29788Thanks for such a quick response. I know it should be evening time there 🙂
I did send a blank PDF with attachment by name “TestPDF.pdf”. You did not get it? I don’t know if either of our mail servers filtered it for some security reason. I doubt though.It is not a blank browser frame. It does show as a PDF and when I right-click to check document properties, it does show as Application: PD4ML. HTML to PDF Converter for Java (398b1)
I am also not understanding why the PDF is not showing anything. I do have ss_css2.jar in classpath but I believe the PD4ML Java v3.9.8b1 version does not use ss_css2.jar anymore.
Thanks again
#29789Oh, my fault – I overlooked the PDF (it appeared in the mail message as a white rectangle on a white background). We’ll address the issue tomorrow.
#29790As a quick test try to add encoding=”default” to
<pd4ml:transform>– it looks like your PDF is corrupted by a character encoding conversion applied to binary PDF data.#29791Awesome 🙂
By adding encoding=”default” to
<pd4ml:transform>got the job done.
I will do some more testing today and see how everything works.
I will also test with older version of PD4ML for which we have a license.
If we decide to upgrade to PD4ML Java v3.9.8b1, I believe we need to purchase the new version again or since we already bought before, we can upgrade for free? I mean I can get the non-demo jar files.Thanks a lot.
-
AuthorPosts
