Forum Replies Created
-
AuthorPosts
-
in reply to: initialPageNumber February 11, 2011 at 17:01#28389
> Could give me some advice regarding the general structure of such an implementation?
> Do I understand you correctly, that I would need to modify the source code for pd4ml_demo.jar, so that the Pd4Cmd sections is able to pass a new parameter to the Java API?You may rename the class, modify, compile and leave the original Pd4Cmd packed to pd4ml(_demo).jar untouched.
You need to invoke the method. But now I am not sure if it will work for inline headers/footers. Next week we’ll check that and most probably add the missing parameter to Pd4Cmd.
> In addition, what is the difference between Pd4Cmd and Pd4Php ?
Pd4Php was the first command line tool version. After we added more general purpose functions we renamed it to Pd4Cmd.in reply to: initialPageNumber February 11, 2011 at 15:58#28386Unfortunately, currently there is no such parameter.
In theory you may add the feature by yourself: Pd4Cmd utility source code is available for free download; PD4ML header/footer Java API has a method to set the page counter initial value.
If you are already our customer, we could add the feature to the main PD4ML development branch.
in reply to: unix : fonts deployment ? February 11, 2011 at 13:46#28402Try to enable debug output on the problem platform (pd4ml.enableDebugOutput()) and inspect STDOUT/server’s log. Does it try to load TTF files? Are the TTF URI correct?
in reply to: SocketException: Socket closed on PD4Device.finalize February 10, 2011 at 18:55#28385Yes, you are right: there is a possibility PD4ML tries to close output stream twice, however we never faced with such kind of exceptions in our test scenarios.
We’ve just implemented a fix in the development build.
On the other hand we would recommend to use ByteArrayOutputStream as a receiver for generated PDF bytes and to send the buffer content to ServletOutputStream at once.
in reply to: colored small empty table rows not visible January 28, 2011 at 14:50#28375Does not “TABLE { empty-cells: show }” CSS style help?
in reply to: HTML5 Canvas – Anyone working on such a thing for PD4ML? January 28, 2011 at 14:48#28379We need some time to estimate efforts. Most probably we’ll introduce an API to plug to any HTML tag (not only to
<canvas>). From my perspective it is realistic to get the feature implemented in March, may be even sooner.in reply to: Template for toc January 28, 2011 at 13:03#28383The trick with a background image seems to be the only solution for the time being.
In theory it is possible to define the template with CSS using “content” property, but it is not supported by PD4ML yet.
in reply to: HTML5 Canvas – Anyone working on such a thing for PD4ML? January 27, 2011 at 13:28#28377Steve,
the maximum we are ready to add to our product is an API to plug your own
<canvas>processing module. Let’s say it will pass to the module all JS includes and<canvas>tag content.But I see (at least) two pitfalls:
1. JS code requires an access to DOM structure of the main document. PD4ML internally does not implement DOM.
2. JS addresses CSS styles of the main document. PD4ML does not implement any standard ways to request CSS properties.May be there are some other issues I do not know yet.
So as you may see a
<canvas>support implementation is going to be limited and isolated from the main document content. On practice all dynamic image generation parameters would need to be inserted as JS constants to<canvas>tag, for example.in reply to: DD element without indent in PDF output January 26, 2011 at 17:26#28376The issue is not reproducible with v370
in reply to: PD4ML bsod crash January 13, 2011 at 13:45#28372PD4ML is 100% Java application and according to Java concept there is no direct way for a Java application to crash hosting OS. On the other hand it may implicitly trigger some bugs of JVM, etc.
HTML rendering (the first phase of conversion procedure) is a resource consuming task. When it utilizes peak amounts, it may expose hidden OS/JVM installation/configuration problems. So I would analyze the following:
1. JVM tries to allocate an amount of memory, which exceeds the available. Please check if -XmxNNNm JVM command line parameter defines a value, which is not greater than physical amount of RAM
2. Hardware drivers incompatibility
3. Physical hardware defectsBut as a first step I would recommend to upgrade JDK/JRE to the most recent version available for your platform
in reply to: No Images in generated PDF in Firefox and chrome January 11, 2011 at 17:02#28371Try to add debug=”true” attribute to . It forces PD4ML to dump resource URLs it tries to load. Compare what it prints in the two cases to STDOUT/server’s log.
in reply to: Debug – Blank Page Rendered from JSP? January 11, 2011 at 16:44#28311An HTML/JSP and corresponding PDF samples would help a lot to analyze.
in reply to: Performance issue January 11, 2011 at 16:37#28112An HTML->PDF conversion procedure may be logically split to 3 phases:
1. document parsing and external resources (image, CSS) loading.
2. document layouting/redndering
3. PDF outputPDF pages output is swift procedure, which takes, as a rule, not more than 5-10% of the entire conversion time.
Parsing is also relatively fast, but loading of external resources may take some significant time due to network delays. To detect them, you may use the current debug mode. It dumps to STDOUT/server log as soon as a particular resource has been loaded.
The most resource consuming phase is HTML layouting/rendering. It depends on the document size and structure. For example, table layouting is done in three passes (min, max, optimal width). That means any nested table is layouted 9 passes, next nesting level – 27 passes and so on. Even if we added a detailed debug output for the phase, it will lead you to quite obvious discoveries: source document huge in size -> long conversion time; source document has multiple levels of table nesting -> long conversion time…
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 11, 2011 at 15:19#28363The attached code did the CMYK to RGB conversion trick for me.
in reply to: sun.awt.image.ImageFormatException: Unsupported color conver January 5, 2011 at 12:21#28360I opened the hi-res image in Photoshop and made sure: the image color space is CMYK.
> img.getColorModel().getColorSpace().getType() == ColorSpace.TYPE_CMYK
The request would make sense if you have a correctly instantiated Image object. But in your case it has internally thrown a sun.awt.image.ImageFormatException. So I suspect “img” object has default values of some properties.If I have time today or tomorrow I’ll try to create for you an “on-a-fly” converter from CMYK to RGB
-
AuthorPosts
