Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #26769

    I’m testing your evaluation version of pd4ml for .net.
    Using a your example I can convert a html file in a pdf file, but I need to convert a string that contains html in a pdf file.
    Someone can help me please?


    You’d need to build a MemoryStream object from the string, like the following:

    [language=java:22f8vtt0]private static byte[] GeneratePdf(string html) {
    PD4ML pd4ml = new PD4ML();
    using (var output = new MemoryStream())
    var encodedBytes = Encoding.UTF8.GetBytes(html);
    using (var input = new MemoryStream(encodedBytes))
    pd4ml.render(input, output);
    return output.ToArray();

    If the HTML refers to any resources (images, CSS) by relative URLs, use render() API method with base URL parameter.


    sorry, but I’m still inexperienced with your product.
    if I use the code above I obtain pdf file as result or I must do other operations?

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

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