Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #26892

    Hello,

    We would like to do byte-to-byte comparison of expected and generated PDF files in our automated testing suite.

    As explained in the official documentation of PD4ML, we have overridden the PD4ML_DOCUMENT_DATE attribute : http://pd4ml.com/api/org/zefer/pd4ml/PD4Constants.html#PD4ML_DOCUMENT_DATE

    However, we have found other attributes that absolutely need to be overridden to make our tests pass.

    1) At the bottom of the PDF file, the “/ID [GENERATED_NUMBER]” metadata is generated randomly.

    Please advise how we can override this value with a fixed user provided value.

    2) The order of the embedded object declaration (/XObject metadata) is random.

    Sometimes we have :

    /XObject <<<br /> /img1 4 0 R<br /> /img2 5 0 R<br /> /img0 3 0 R<br /> /img3 2 0 R<br /> >><br />

    Other times :
    <br /> /XObject <<<br /> /img3 2 0 R<br /> /img1 4 0 R<br /> /img2 5 0 R<br /> /img0 3 0 R<br /> >>

    And so on.

    We use Velocity with CSS attributes to embed images so the order of inclusion should not be random.

    Please advise how we can fix the order of the /img elements.

    Thanks

    #29440

    Some time ago we specially addressed automatic testing issues.

    A JVM parameter like -Dpd4ml.document.id=0123456789abcdef (16 chars) should help to resolve /ID [GENERATED_NUMBER] issue.

    Also the image references are sorted by original image paths. Can it be that the paths differ from test to test?

    #29441

    Thanks for your answer.

    Setting the system property solved the random ID issue.

    Concerning image paths, they are defined in a static CSS file.

    This CSS file is located in a fixed directory. The images also.

    I would have looked at the source code in debug to understand the issue but I do not have access to the source code.

    Could you think of anything else that would randomize this list?

    Thanks for your help.

    #29442

    Obviously it would make sense to sort the image references by image IDs. I’ve just corrected the code in the development build, and it seems XObject dictionary appears sorted now.

    #29443

    Would you know in which version and/or at which time this fix would be released?

    #29444

    We could send you an interim development build. Contact support pd4ml com. Currently the image reference sorting is the only difference from v385fx3

    #29445

    Would you have an idea when this would be released? 1 month, 6 months, a year?

    #29446

    ~1 month

    But definitely this year.

    #29447

    Awesome thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

The forum ‘PD4ML Tips & Tricks’ is closed to new topics and replies.