• Convert docx into pdf and save in NotesDocument

    By Jérôme S 2 years ago

    Hi,

    In recently installed poi4Xpages to use the docx conversion into pdf. I succeeded using it to generate pdf files with an internet browser.
    But now, I try to generate pdf files and save them directly in a NotesDocument. At this time, I couldn't find how to do that.

    I've tried to access the PDFConversionService Class but the package biz.webgate.dominoext.poi.pdf is unaccessible.

    I've tried to install doc4xj and its dependencies on my Domino server but I've got ClassCastExceptions because the jars are already included in poi4Xpages (but unaccessible, I can't instantiate docx4j objects directly from poi4Xpages).

    So, did someone succeed to save a pdf file in a NotesDocument ?

    Thanks for replies
    Jérôme

    • By Christian Güdemann 2 years ago

      There is a postGeneration Method Binding available, where you can intersept the generation of the PDF.

      But to understand the use case. You want to generate the PDF, but then save it to a Document. Let me think how we can suport this better.

      • By Jérôme S 2 years ago

        Thank you Christian for your answer. I tried the postGenerationMethod by just printing “test” text. The text was successfull printed just after the docx mapping treatment, but before the pdf generation. So, I can't get the PDF document. Am I doing something wrong ?

        Is there a way to intercept the httpResponse before it's sent to the browser just after the PDF has been generated ?

        Jérôme

        • By Christian Güdemann 2 years ago

          Good Point. How fast do you need an answer to this? I had a simular conversation with Declan, but I've to search the E-Mails. Will you be at Connect?

          • By Jérôme S 2 years ago

            I need it for the second week of march if possible. If you confirm me that it's possible to do what I describe in this topic, I can work on other developments before integrating the pdf saving.

            Unfortunately no, I will not be at Connect next week :-(

            Thank you for your help and have a nice weekend and a pleasant Connect if you attend to it