Forum Replies Created
-
AuthorPosts
-
in reply to: setHTMLTemplate() August 5, 2009 at 13:52#27425
I would recommend to define inline headers instead of API definitions. See
html-pdf-faq-f1/pdf-page-headers-footers-definition-options-t41.html
If it is not acceptable for some reason, please email to PD4ML support and supply the request with the HTML code you use to define the HTML header.
in reply to: problems with pd4ml.pro.trial.351b7 August 5, 2009 at 13:40#27418I opened the document in MS IE and got more-less the same result. Could you please describe what is the expected layout?
in reply to: is with PD4ML Java Library multithreading possible? August 5, 2009 at 13:30in reply to: Supported platforms August 5, 2009 at 13:22#27229Try to add
2>/www/zendcore/htdocs/scriptcase/tmp/error.txt
to the command line. It should output error messages, if any, to error.txt
in reply to: Null Pointer Exception While Rendering A tomcat URL August 5, 2009 at 03:58#27354As I see from the exception stack trace, an attempt to load source HTML from
http://localhost:8084/ManglamProj/vtsInvoice2.jsp?cmd=print&invoice_id=980
failed with error code 500. It is a problem of vtsInvoice2.jsp.
Does the URL work if you open it with a web browser?
in reply to: Supported platforms July 26, 2009 at 12:50#27227PD4ML runs under any JDK, starting from v1.3. However Pd4Php from PHP wrapper sample is complited with JDK 1.5. You may always recompile Pd4Php with JDK 1.4 (its source code is part of the wrapper package), or wait some time untill we updated it on our site (it will take 2-3 days).
in reply to: Custom Fonts July 26, 2009 at 12:38#27411@koda-dev wrote:
When we use the command line to generate the pd4fonts.properties file it returns a pd4brower.properties file instead.
During the first run of PD4Browser (java -jar pd4ml(_demo).jar) in any mode, it generates default application properties file pd4brower.properties
You run PD4Browser the first time to generate TTF properties. So it produces two .properties files. One is in the current directory (./pd4brower.properties), another one is in the font files directory (/path/to/my/fonts/pd4fonts.properties)
The fact of two simultaneous .properties files output may be confusing. Also if you generate the properties file for c:windowsfonts, the resulting file exists, but it is not visible with windows explorer (in the folder the explorer in the fonts-only view mode). But the file may be easily opened with any text editor, for instance.
Obviously we need to clarify the topics more detailed in the documentation.
in reply to: Custom Fonts July 24, 2009 at 08:54#27408The debug tactics is quite simple: switch debug output on with pd4ml.enableDebugInfo() and check what it dumps to STDOUT. It should be traces that it successfully loaded pd4fonts.properties (by the way, did you generated the file as required?) and the referenced font files.
TTF embedding feature has one requirements to TTF file format: the custom TTFs must be UNICODE-compatible (as almost any modern TTF font).
If for some reasons it rejects your TTFs, you may play with TTF file format using free FontForge utility (you may change TTF file options in “Save TTF” dialog). It is built for UNIX/Linux platform, but also runs on Win32 in Cygwin environment. Just google for a preconfigured FontForge + Cygwin with the following keyword: “fontforge-mingw_2008_11_21“
in reply to: Stylesheet definition results in emtpy pdf document July 23, 2009 at 22:12#27389Sorry for the delay with the reply.
@mil wrote:
we have a problem in conjunction with the definition of stylesheets. Currently we set the stylesheet file via call to PD4ML.addStyle(), e.g.
pdfCreator.addStyle(someUrl, true);We define the page header using the method PD4ML.setPageHeader(somePD4PageMark).
We use PD4PageMark.setHTMLTemplate(someHTML) to set the HTML content.
addStyle() method impacts only the main document and headers/footers defined inline (with
<pd4ml:page.header>tag, for example)First of all: Does “someHTML” have to be valid HTML, that means does it have to contain tags like “
<html>" or "<body>”?Yes, if you need to specify a style to a header or footer defined API- way, “someHTML” should contain all the
<html>, <head>, <body>tags and a style section or a reference to an external stylesheet. Unfortunately it cannot inherit style of the main document.After that, we render the page using the method PD4ML.render(someURL, someStream);
The problem concerning the stylesheet definition now is as follows:
The stylesheet file contains the following style definition:body { background-color: white; font-family: Arial,Helvetica,Geneva,sans-serif; }The resulting pdf document only contains the header, but not the content retrieved by call to PD4ML.render(). (We found out that the content somehow gets painted over by the background-color.)
After removing “background-color: white” out of this style definition, everthing works fine. As our customers can define their own styles for their printings, we cannot assure that a customers won’t create a stylesheet we ran in problems with. Could you please instruct us how to prevent that issue?It seems to be a bug in our code. In the most recent betas of v351 we addressed a similar issue. By the way, which PD4ML version do you use? You may check that if you open a generated PDF in Acroread and inspect File->Properties->Application
in reply to: Rendering chart image in PDF July 22, 2009 at 20:06#27395The marked with red is a warning.
PDF allows to embed JPEGs and some species of PNG “as is”. Transparent, interlaced, “too-multicolor” PNGs need to be reformatted to the native for PDF not-lossy image format (more-less identical to GIF). As a result PDF size grows. However it is almost not noticeable for small images.
in reply to: CSS Issues – possible other java css parser? July 22, 2009 at 19:31#27396A replacing of the parser is not a solution. It is not a big deal just to read and parse CSS or HTML. The most important thing is to render document layout, respecting the parsed styles and the document markup.
PD4ML HTML renderer supports “the most popular” features of HTML and CSS. And the number of the features is quite big. If you dramatically need a support for some more – just send us an HTML/CSS sample. We’ll analyze and make decision to implement the missing features or not.
Because of generic Java platform restionctions we always need to balance between feature-richness and performance.
in reply to: Rendering chart image in PDF July 22, 2009 at 16:42#27393But what type of image does piechart actualy return? PD4ML supports by default only Web- and Java-friendly image types: GIF, PNG and JPEG
Also “image size: 1895” log entry does not 100% mean it got an image. It still may be an error HTML message. The space characters in the image URL are possible reason of the error.
in reply to: Testing Lotus Domino Evaluation database July 22, 2009 at 16:29#27392PD4ML stores some image (for example checkbox shapes) and configuration resources in pd4ml.jar and loads them using Java class loader.
Lotus database signing restricts some Java permissions and obviously an access to the classloader is among them. Unfortunately I cannot give you a hint what exactly needs to be (re-)configured by signing. But hopefully the direction where to look for the problem solution is more-less clear: PD4ML needs permissions to load resources with the class loader.
in reply to: Conversion issue with Chinese characters July 19, 2009 at 12:50#27378A solution for the missing Korean characters problem is exactly the same as for the Chinese: you need to make sure, that you use PD4ML Pro (it does not matter if that commercial or evaluation version) and TTF embedding is correctly configured:
pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html
PD4ML examples pack (https://pd4ml.com/examples.zip) includes chinese_ttf sample, which illustrates the TTF embedding feature.
in reply to: Conversion issue with Chinese characters July 16, 2009 at 12:21#27376??? characters instead of CJK glyphs may appear in two cases:
- You use non-Pro version of PD4ML
- TTF embedding is not switched on or not correctly configured. See: pd4ml-html-css-pdf-tips-tricks-f7/ttf-embedding-t42.html
-
AuthorPosts
