Forum Replies Created
-
AuthorPosts
-
in reply to: Break line in dynamic values April 15, 2015 at 18:44#29717
A placeholder (i.e. $[line1]) substitution is performed after HTML is parsed: that means a DOM-like structure is already build.
$[line1]
code results a creation of a block element contains a single content element.
$[line1]
$[line2]results a block element with two content elements.
A placeholder substitution is applied to the content elements.
When line1=”text 1
text 2″ dynamic data comes, in theory it should place “text 1” instead of $[line1], delete the trailing content (if any), create a new content element object, assign it to the same parent block object, put “text 2” to it, append the trailing content, deleted before. The functionality is not foreseen and not implemented.If the situation is critical and there is no feasible workaround – we could urgently implement that on a paid basis, but I need to estimate efforts with the developers.
in reply to: Break line in dynamic values April 14, 2015 at 14:00#29715No, it is not possible due to the current PD4ML architecture specifics.
Obviously the only solution is to define a number placeholders:
$[line1]
$[line2]
and substitute them correspondingly to a needed number of linesin reply to: What Font file extensions does PD4ML support? April 14, 2015 at 13:45#29709By a font configuration procedure PD4ML scans a given font directory for .TTF, .TTC and .OTF font files.
in reply to: can not read ‘arial’ from java:fonts/arial.ttf: problem read April 14, 2015 at 13:42#29701The error is caused by IOException thrown in
java.awt.Font.createFont( Font.TRUETYPE_FONT, fontBytes )
call and usually caused by an attempt to load a custom font, which is not fully compatible with Java’s font subsystem. Usually the standard arial.ttf (for example from our sample fonts.jar) causes no problem.
Can you reproduce the problem when run PD4ML in command line mode?
in reply to: Dynamic values not working with CSS text-transform property April 14, 2015 at 13:28#29700The issue has been fixed in the development build.
The fix is going to be available with the next maintenance release.in reply to: Rending issues with 395 for images and tables April 9, 2015 at 14:35#29698PD4ML Std and Pro were never positioned as a solution for web sites capture. The 100% Java libraries allow you to define (or auto-generate) a PDF document template layout an easy way with a markup language everybody knows: HTML. As a pure Java solution it has its performance drawbacks and limitations – it just cannot compete in a page rendering quality with major web browsers when converting interactive media-rich web sites.
PD4ML Web is intended to address the issues of Std/Pro, but unfortunately has its own limitations. It is built as a wrapper for PhantomJS/Webkit (native platform executable) runtime and exposes PD4ML API for Java applications. It utilizes print/PDF export subsystem of Webkit. An advantage of the approach is very good HTML rendering quality, but its PDF output is quite basic and not optimized: no support for hyperlinks, outlines, attachments, no flexibility with header/footer definitions, fonts are not shaped etc. PD4ML applies some post-processing to Webkit PDFs, but some issues are still there. And one of the major issues: calls to a native binary do not comply with J2EE guidelines.
So you’ve got a choice:
PD4ML Std/Pro – for an automatic reporting, invoice, documentation generation etc. You only need to drop a couple of JAR files to your application shared lib/ dir and the functionality is instantly available.
PD4ML Web for web site capture (probably for archiving purposes). In the case you would additionally need to install PhantomJS binary and to point to it from your application.
in reply to: Performance Issue April 7, 2015 at 18:57#29697Try to switch debug on (pd4ml.enableDebugInfo()) and inspect server’s log file (or STDOUT) if there are any requests to remote resources, could possibly cause a network delay.
in reply to: Scaling problems March 27, 2015 at 08:19#29696A text width also depends on a particular font used.
By default (when no TTF embedding configured), PD4ML outputs PDFs refer to Acroread’s built-in Type1 fonts; a Web browser most probably uses standard TTF from OS.
Helvetica of Acroread looks very similar to Arial, but in fact they are not exactly the same (especially in glyph widths). Probably that is the reason.
Try to configure TTF embedding and compare PDF and rendered HTML again.
in reply to: NullPointerException at at org.zefer.pd4ml.npdf.c.o00000(Unk March 19, 2015 at 15:44#29676Please send the relevant file(s) to support pd4ml com, and also please let us know which version of PD4ML you currently use.
in reply to: Blank page using JSP on Java 8 March 19, 2015 at 15:38#29688Glad you solved the issue!
in reply to: null pointer exception March 19, 2015 at 15:36#29679It would help a lot if you published an exception stack trace and the source HTML, you passed to PD4ML (hopefully there is no sensitive data in it)
in reply to: German umlauts within custom JSP tag March 18, 2015 at 14:59#29695A usual UTF-8 code for ä is “C3 A4”, in your document it is “61 CC 88” which is actually a separate definition for a and diacritical marks (umlaut dots) to be rendered as a single glyph.
I have found an explanation by the link http://www.redleopard.com/2008/12/character-codes-and-encoding/
Unfortunately PD4ML does not support that notation for the time being. So the only workaround is to replace “61 CC 88” byte chains with “C3 A4” or tune your database to return UNICODE data as regular UTF-8
in reply to: German umlauts within custom JSP tag March 18, 2015 at 14:03#29693Can you generate such HTML with a sensitive data stripped off and send it to support pd4ml com?
in reply to: German umlauts within custom JSP tag March 18, 2015 at 13:21#29691Hmm… Try to add enable=”false” to
<pd4ml:transform>– it should return HTML instead of PDF. Check if all placeholders are substituted with data correctly. I would suspect some of them appear as ISO-8859-1, others as UTF-8 – encoded.in reply to: German umlauts within custom JSP tag March 18, 2015 at 13:10#29689Unfortunately you did not publish a JSP code snippet to see the way you defines headers/footers.
Try to define headers with HTML code using
<pd4ml:page.header>instead of<pd4ml:header>(and footers correspondingly).Does it change anything?
-
AuthorPosts
