HTML to PDF / DOCX / RTF Java converter library Forums PD4ML v3 Archived Forums (Read Only) General questions / FAQ There was an Error opening document. Erro when opening PDF.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #27092

    Hi all,
    I m rendering PDFs using PD4ml from Memory stream.

    After rendering PDF I’ve tried to open that file using File.Open() method.

    But only once I’ve got an error like following :
    “There was an error opening document. This file is damaged and could not be repaired.”

    In my log an exception of “The type initializer for ‘org.zefer.html.doc.css.CssRuntime’ threw an exception” is stored. But I’m not sure that this is the reason I’m just assuming that this could be the reason.

    But the problem is that this issue can’t be reproduced in my system. That’s why I can’t get the reason and a proper solution.

    Please help.

    #29914

    Try to open the PDF in a text editor (as plain text). I suspect the file either 0 bytes long or has only PDF file prefix.

    org.zefer.html.doc.css.CssRuntime init error is obviously a reason. For some reason it cannot locate all needed libraries (.DLLs in a case of .NET).

    #29912

    Yes the reason for CSS.runtime is got. There is a dll needed called CSSParser.dll that I’ve put.

    But solution for error of opening PDF files is still cant be reached.

    But my concerned person told me that there in an exe called w3wp for generating PDFs when multiple users tried to Generate PDFs at the same time this exe is conflicting and an error is thrown when opening PDFs.

    So I want a solution so that I can avoid this conflict of exe when multiple users tried to generate PDFs at the same time.

    So kindly let me know what should I do about that.

    #29913

    w3wp.exe does not belong to PD4ML – please contact its authors.

    Please note – PD4ML is thread-safe but not re-enterrant. That means you cannot access the same PD4ML instance from multiple threads at the same time. Create an instance for each HTML->PDF conversion request.

    #29915

    Thanks for your concern. I’ll surely find out a solution for w3wp.exe thank you.

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

The forum ‘General questions / FAQ’ is closed to new topics and replies.