Forum Replies Created

Viewing 15 posts - 721 through 735 (of 1,410 total)
  • Author
    Posts
  • in reply to: PD4Device.finalize() closes output stream and causes mixup!
    #28893

    Currently PD4Device.finalize() looks like that:

    /**
    * @see java.lang.Object#finalize()
    */
    public void finalize() {
    //		dispose();
    }

    Unfortunately I could not find in our source control system when exactly the dispose() call has been commented out. But it definitely happened more that 2 years ago.

    dispose() method is triggered once now. The method forces collected PDF metadata to be written and it still closes the output stream.

    I would recommend to wait the next 2-3 hours – we plan to get from QA and to release the newest version today. Of you can get it on Monday.

    in reply to: PD4Device.finalize() closes output stream and causes mixup!
    #28891

    The issue has been solved in the actual versions of PD4ML. Just give a try to any fully-functional evaluation version (or request a commercial one to evaluate from support pd4ml com).

    > usual contract is that the one who opened a stream is the one responsible for closing it

    You are right. But if we leave the output stream not closed, there is a probability the hosting framework writes some finalizing content/tags there, which corrupts the generated binary PDF data.

    A safer (and recommended) approach would be to pass ByteArrayOutputStream to render() method. That would also let you measure generated PDF size and send correct Content-length HTTP header.

    in reply to: question for pd4ml using CSS
    #28894

    border-collapse: collapse is supported since v3.21, however a correct table break (by a page break) with the style is applied is implemented in v3.80b1.

    Your version definitely does not support the feature.

    in reply to: How to optimize the size of the generated PDF?
    #28885

    right.

    in reply to: How to optimize the size of the generated PDF?
    #28883

    Since one of the recent versions, there is a bug in our code. In some situations it does not compress image bytes. Most probably you faced with the effect.

    The issue is already solved and we are almost ready to release an updated version. Currently the new build is under QA. If everything is ok, we’ll release the version later today.

    in reply to: Cache issue
    #28745

    PD4ML does not test if a particular resource (image or stylesheet) has been changed: if it has a cached version – it uses it.

    You may explicitly disable caching with pd4ml.cache.enable=false environment variable, or with a dynamic parameter.

    Map m = new HashMap();
    m.put(PD4Constants.PD4ML_CACHE_ENABLE, false);
    pd4ml.setDynamicParams(m);

    We’ve just refined clearCache() method in the development build, but as I got it worked for you before.

    Another workaround would be to add a harmless dynamically generated parameter to the stylesheet reference:

    ./styles/main.css?rnd=<random_number>

    It should distinguish a new stylesheet from ones loaded before. As a drawback of the approach it will accumulate stylesheet versions in the cache. It is not that dramatic, as they are cached as soft references, but anyway it is a good idea to perform clearCache() from time to time.

    in reply to: pd4ml.cache.enable=false
    #28874

    We’ve just refined pd4ml.clearCache() method to remove ALL cached objects, including harmless parsed CSS properties.

    But it seems the issues with the cache reset happened only if you reuse PD4ML instance for multiple conversions (which is not recommended, in general). So I am not sure if we addressed exactly the issue you faced with

    Also -Dpd4ml.cache.enable=false prevents downloaded objects from being cached. Bearing in mind the image size has been changed in the debug output, I’ve got no explanation from where the old image comes from.

    Should we send you an actual development build to test the caching issues on your side?

    in reply to: pd4ml:transform does not seem to work
    #28882

    No, there is no tag to define initial conversion parameters.

    As long as you do not use the JSP taglib, I guess you instantiate PD4ML object and call render() method. Why don’t you define needed parameters via the API before the render() call?

    in reply to: [High Priority] HTML inline-Hyperlinks not working in RTF
    #28877

    We’ve just added the feature. It will be available with the forthcoming beta release (hopefully, this week)

    in reply to: pd4ml:transform does not seem to work
    #28880

    There is no dedicated tag for that. It can be configured with PD4ML API: pd4ml.setHtmlWidth(), pd4ml.setPageSize() and pd4ml.setPageInsets()

    there is also a possibility to change the parameters on-a-fly with <pd4ml:page.break>: https://pd4ml.com/cookbook/pdf_dynamic_format_change.htm

    in reply to: pd4ml.cache.enable=false
    #28873

    We’ll address the issue tomorrow. Hopefully it will be fixed with the beta release planned this week.

    in reply to: display current date every time the PDF is opened
    #28794

    It is going to be released this week.

    in reply to: pd4ml:transform does not seem to work
    #28878

    <pd4ml:transform> is a custom JSP tag, which works only with JSP.

    The tag is a wrapper for PD4ML API, so all its attributes have equivalents in PD4ML class methods.

    in reply to: Table cell border not drawn after page break
    #28852

    It seems the simplest workaround would be to add

    style=”border-collapse: separate”

    attribute to the main <table>

    in reply to: Spaces being stripped
    #28870

    Is the third-party app based on PD4ML?

    If so, the only theoretical explanation is that the application has misconfigured TTF embedding feature or it uses corrupted TTF fonts with spaces defined wrong way.

    (Sounds strange, but it is usual for special TTF fonts, intended to display digits from 0 to 9 only)

    I would also suspect a buggy version of PD4ML, but I do not remember any version with a problem like that.

Viewing 15 posts - 721 through 735 (of 1,410 total)