Sending PDF in NAV2017

AitorEGAitorEG Member Posts: 316
Hi everyone,

I need to publish a webService in NAV2017. This webService will receive a posted sales invoice number, and need to return the invoice in a PDF format. is this possible? A time ago, I read something about converting the PDF into base64, but now I cannot find any info about it.

Any hint to solve this issue?

Thank you very much

Best Answer


  • AitorEGAitorEG Member Posts: 316
    Wisa123 wrote: »
    To achieve this you want to print the report in Memory to a OutStream. Pseudocode
    //obtain recref
            if not report.SaveAs(ReportId, '', ReportFormat::Pdf, PdfOutstream, RecRef) then

    at least in NAV2018 the Tempblob Table has a ToBase64String() procedure that alows you to receive the textstring you are looking for.

    Thank you. I'll work on it!
Sign In or Register to comment.