Forum Replies Created
-
AuthorPosts
-
in reply to: Technical questions / Troubleshooting March 3, 2023 at 17:10#36114
Hi,
where can I find the javadoc for the overloads of method FontCache.generateFontPropertiesFile()?
Thanks
in reply to: Where is javadoc for FontCache.generateFontPropertiesFile? March 3, 2023 at 17:17#36115Why do you need to overload the static method?
in reply to: Where is javadoc for FontCache.generateFontPropertiesFile? March 3, 2023 at 17:26#36116I don’t want to overload, I search the description of the params:
generateFontPropertiesFile(String, BufferedOutputStream, boolean)
generateFontPropertiesFile(String, BufferedOutputStream, boolean, String, short)
generateFontPropertiesFile(String, String)
generateFontPropertiesFile(String, String, String, short)
generateFontPropertiesFile(String, String, short)in reply to: Where is javadoc for FontCache.generateFontPropertiesFile? March 3, 2023 at 17:46#36117Hmm… For some reason the method is excluded from Javadoc.
Here is the signature of the main method:
/** * scan font directory, generate pd4fonts.properties and output it to the given OutputStream. * @param fontsPath font directory path * @param bos pd4fonts.properties data output stream * @param addFontDirReference allows to add the original fonts dir path to pd4fonts.properties. It is useful for a case the generated .properties file * cannot be saved to the original fonts dir (i.e. system fonts dir). * @param filter if not null, defines comma-separated list of allowed font name patterns. For example "arial,cour,time" * @param logLevel log output control bit mask * @throws IOException */ public static void generateFontPropertiesFile(String fontDirPath, BufferedOutputStream bos, boolean addFontDirReference, String filter, short logLevel) throws IOException {
in reply to: Where is javadoc for FontCache.generateFontPropertiesFile? March 3, 2023 at 17:54#36118Thank you very much.
in reply to: Where is javadoc for FontCache.generateFontPropertiesFile? March 3, 2023 at 18:07#36119FYI: PD4ML GUI tool
offers a new feature called “[fonts tool]” (you can find it in the status bar). Can help you with pd4fonts.properties generation
in reply to: Technical questions / Troubleshooting March 8, 2023 at 15:10#36144Hi,
I tried to render HTML symbols such as ☒ and ☐ (ballot box) but no luck. Version used is 4.0.15. JVM charset is UTF-8.
here is my sample code:
PD4ML pd4ml = new PD4ML();
String test = “<br>☒</br><br>☐</br>”;
InputStream is = new ByteArrayInputStream(test.getBytes());
pd4ml.readHTML(is);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
pd4ml.writePDF(baos);
Files.write(Paths.get(“D:”, “test.pdf”), baos.toByteArray());Is there any chance to render such symbols?
Cheers Felix
in reply to: Problems Rendering HTML Symbols March 8, 2023 at 15:13#36145for easier debugging
String test = "<br>& # 9746;</br><br>& # 9744;</br>";
(without the blanks)in reply to: Technical questions / Troubleshooting March 9, 2023 at 13:00#36152Hi,
We have a table rendering issue with this simple case :
<table style="border-style: solid; border-color: #000000; width: 100%;border-collapse: collapse;border-width:2px;"> <tbody> <tr style="background-color: #c2e0f4;"> <td>Text1</td> <td>Text2</td> <td>Text3</td> </tr> </tbody> </table>
The text is invisible in the cells (it seems to be still present but not visible)
It works fine without the border-collapse rule.Attachments:
You must be logged in to view attached files.in reply to: Text not visible in table cells March 9, 2023 at 13:28#36154Hi! It seems to be a wrong text color style inheritance.
We are converting the topic to support ticket to keep you informed regarding the bugfix progressin reply to: License file for evaluation purpose March 9, 2023 at 19:01#36155Thanks you so much for your reply.
We have a very old version of PD4ML. I believe we have version 1.0 jar files but in jsps we use following taglib:
<%@ taglib uri=”http://pd4ml.com/tlds/pd4ml/2.6″ prefix=”pd4ml” %><%@page
contentType=”text/html; charset=ISO8859_1″%><pd4ml:transform
screenWidth=”900″
pageFormat=”LETTER”
pageOrientation=”portrait”
pageInsets=”25,50,25,25,points”
enableImageSplit=”false”>Should we still stick with version 3 or should we change to version 4 ?
Also I figured out the debug=”true” breaks the page. Instead changing it to debug=”1″ or debug=”0″ works.
Maybe thats a bug in PD4ML?
Thanks.in reply to: Technical questions / Troubleshooting March 9, 2023 at 21:21#36156Hello,
I am trying to upgrade from PD4ML v1 to v4. We have been using the transform tag in our jsp’s to convert to pdf.
The image and css style sheets are not gettinf found unless we have use an absolute url. That was not the case in PD4ML v 1PD4ML v 1 image and link tags looked like this:
<link rel=”stylesheet” href=”/css/report.css”></link>
But now we need to define as absolute url:
<link rel=”stylesheet” href=”<%=serverurl%>/css/report.css”></link>
/images/logo-big.jpg” alt=”logo” align=”top”>Can you tell me why first style using relative url is not working anymore and if there is a better way?
Thanks so much.in reply to: Image and style sheet not being found using relative url March 9, 2023 at 21:26#36157Correcting my post:
Now in v4 following absolute urls are working but relative urls such as “/css/report.css” are not working:<link rel=”stylesheet” href=”<%=serverurl%>/css/report.css”></link>
/images/logo-big.jpg” alt=”logo” align=”top”>in reply to: Technical questions / Troubleshooting March 13, 2023 at 15:09#36158Hi!
While upgrading from v3 to v4 I encountered two problems related to generating PDFs from JSPs. First was already mentioned by someone else: https://pd4ml.com/forums/topic/image-and-style-sheet-not-being-found-using-relative-url/
(I confirm what madhu123 said – relative URLs, especially ones that include parameters like /generateImage?id=1234 don’t work at all, you have to give full URL with server address.)More importantly, even when they work (with full address), they are called without original JSP session attributes. This means that the servlet which returns images rejects such requests (images are only available to logged in users).
I’m pretty sure the JSP is run within a proper session (I debugged it) but all the external links are not.in reply to: HTTP session & server-generated images March 13, 2023 at 15:14#36159I will add that both things worked in v3.
-
AuthorPosts