Problem with ResultBuffer

  • Hi!

    When I use the Export(filename) method, the PDF is acutally created. But the ResultBuffer is empty. Same thing with Export() and Export("memory") (this was a try, I saw "memory" somewhere in the docs...)

    I really need to convert a PDF without creating a file.

    What should I do to have the ResultBuffer property filled?

    Thanks

    VB

    • Offizieller Beitrag

    Hi,

    which development system?

    If you use .NET or the OCX using a stream is recommended. See http://www.rtf-net.com for some ASP .NET examples.

    The bare DLL supports the commands:

    WPSYS_GETResultBufferLen = 21; // Length of Result
    WPSYS_GETResultBuffer = 22; // Ptr to Result. If Ptr provided copy there
    WPSYS_ResultBufferClear = 23; // Clears the buffer

    This commands can only be used if the PDF was started with

    filename = "memory"

    in BeginDoc

    Alternatively the value 2 can be used in the parameter UseStream

    in the exported method:

    function WPDF_BeginDoc(env: pdfEnviroment; FileName: PChar; UseStream: Integer): Integer; stdcall;

    I hope this helps,
    Julian

  • Hi!

    I'm using C# and the .NET Wrapper class wPDF. I have to convert a RTF to a PDF.

    I'd would be pleased to use the steram, because anyway, my code needs to work with a stream.

    How to convert a RTF using BeginDoc instead of the Export method?

    Thanks

    VB