none
command line api headless option / faster pdf generating / official java base library RRS feed

  • Question

  • i wonder why there is no command line of office like in libreoffice "--headless convert-to pdf " 

    I think headless would be welcome and a must have feature.

    Actualy i have spring boot based webapplciation and I use Apache POI to generate word doc, then I save it on system AND trough a vbs script I generate a pdf from this   temp.docx . Problem is: each time I need pdf word instance must be launched and for this requirement word  use so many resources and IMHO really slow. 

    We use word and all our users will use word and pay "user licence"  and we expect to all our user to have microsoft office when buy our webapplication because of possibility to create template,  but actually this can't be achieved  easily and quickly.

    What are you thinking about this feature, is this good way to generate pdf from doc ? BUT AS QUICK AS POSSIBLE ! 

    And last question, i really not understand why generating PDF from a doc file (even when I run WORD and do File > Save as ... PDF ) why this is very very long process, cant you simplify your xml and make a simple xml to generate PDF. because to generate only 10 pages or 50 pages it take a while ! very annoying in 2017 technologies. 

    All from java as very very fast but this conversion take long, my boss expect this process to be faster even if we avoid using word, but i don't want omit world because I want let users to have/create template then merge fields/variable with apache poi then generate pdf.

    Apache POI is very very complicate library but it is fast !  Are you working on something like this ? Any ETA? 

    Microsoft actually is very interesting by choose opensource way, what about have official/good api on java to manipulate word and generate pdf very quickly ! 

    Please apologize ton, my question/mind is really companionable and want better tools, that's all! hope i'm on good place to ask this because there is 1k forums/place to write something. And hope will recieve complet/pleasing/clever response.

    thanks 

    eb

    Thursday, October 12, 2017 7:08 PM

All replies

  • Hello,

    This forum (Word for Developers) is for development issues when using Word Object Model.

    As far as I know, Office 365 supports PowerShell commands to work with Skype for Business Online, SharePoint Online, and Microsoft Exchange Online. Please visit Manage Office 365 with Office 365 PowerShell. There is no other similar approach.

    If you have any idea about new feature, I suggest you submit feedbacks on https://word.uservoice.com/ or https://officespdev.uservoice.com/

    For your issue about long process to save as Pdf, I suggest you post on https://social.technet.microsoft.com/Forums/office/en-US/home?forum=word

    We are not familiar with Java. After some research, I think you may use Docx4J to convert to PDF.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, October 13, 2017 3:32 AM
    Moderator
  • And last question, i really not understand why generating PDF from a doc file (even when I run WORD and do File > Save as ... PDF ) why this is very very long process, cant you simplify your xml and make a simple xml to generate PDF. because to generate only 10 pages or 50 pages it take a while ! very annoying in 2017 technologies. 

    I have no idea what you think is 'slow' about creating PDFs in Word; I just timed the PDF save for a 96-page document at 2 seconds...

    Maybe the issue you're having is with your system and not Word, per se.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, October 13, 2017 4:37 AM
  • @celeste  thanks for  links

    @macropod I tried on 3 computers, same behavior maybe because of table in each page , and only one logo-image in header 

    here you are result GIF in action of 52 pages  https://gifyu.com/images/pdfgen.gif

    doc size: 253 Ko

    pdf size after conversion : 1157 Ko

    anyway will see on uservoice website

    im under

    windows10 x64
    SSD 256go
    Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz, 3408 MHz, 4 cœur(s), 8 processeur(s) logique(s)



    • Edited by ebeg Friday, October 13, 2017 5:44 AM
    Friday, October 13, 2017 5:40 AM
  • You complained of save speed; now you're introducing file sizes. Although related, this doesn't 'prove' the save to be slow. Did you actually time it? FWIW, at 1802kb, the PDF produced by the save in my previous post as taking just 2 seconds to save is far larger than yours; hardly what I'd call sluggish performance.

    Cheers
    Paul Edstein
    [MS MVP - Word]

    Friday, October 13, 2017 11:10 AM
  • i just introduce size  FYI, to know doc size before convertion 52 pages  of 253 seems really little size and expect to have fast pdf but not in GIF you can see it take a while !  i don't speak about size don't care about it, just time until conversion finish. ok you do it in 2sec but what computer you have what cpu what word version ? i don't believe that ! you have table inside ? text formating inside ? image in each page ? give me you doc file will tell you (gif in action) how it takes to me 
    Sunday, October 22, 2017 11:35 AM
  • Hello,

    This forum is for development issues, so I suggest you post on Word IT Pro Discussions forum for your issue about slow speed to save as Pdf. Thanks for your understanding.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 23, 2017 2:36 AM
    Moderator