Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

How to PRINT pdf invoice from docuValue

Posted on by 10

Hi,
guys I need to print file from DocuValue as pdf. Should i prepare custom report or is there any easier way to do it?

If the cusom report is the only solution, what should it look like?

PS. Now im using PrintJobSettings to PRINT reports as pdf.

  • 0dynTheMutant Profile Picture
    0dynTheMutant 10 on at
    RE: How to PRINT pdf invoice from docuValue

    I have no idea what type of encryption is used.

    Added part of code to Pdfsharp Library and now AES128 encryption is supported by this library. This change alloved to open 1 document in import mode (insted of open mode) and copy pages to another pdf. But it worked only with 1 document. Still i can;t open some other documents cause of not supported encryption

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: How to PRINT pdf invoice from docuValue

    Do you know what encryption it's using?

    What do you mean by "I added AES128 - and it helped in one case". Where did you add it and how? Which case did it solve and what it failed to resolve?

  • 0dynTheMutant Profile Picture
    0dynTheMutant 10 on at
    RE: How to PRINT pdf invoice from docuValue

    That external invoice is protected/encrypted i can open it and print it using adobe but i can;t open it to copy pages using e.g PdfSharp tool. Thats why i need to print it insted of saveing. PdfSharp throws me error :

    "The PDF document is protected with an encryption not supported by PDFsharp"

    I added AES128 - and it helped in one case.

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: How to PRINT pdf invoice from docuValue

    I think that we indeed should ask why, because if we don't know what you're trying to achieve, we can't suggest a better solution. You see that the solution you've designed is difficult to implement - there may be a better way.

    If I was developing the solution, I would resist this technical design. If it was absolutely necessary to use, I would likely resort to .NET. But if I use .NET, I could likely manipulate the PDF directly, instead of going through a print driver.

    I don't know if AX 2009 contains anything that could help you. But you can find more generic idea, usually using .NET. For example: Print Pdf in C#.

  • 0dynTheMutant Profile Picture
    0dynTheMutant 10 on at
    RE: How to PRINT pdf invoice from docuValue

    Yes, thats correct - don;t ask why i need it...

               binData = new BinData();

               binData.setData(fileCont);

               binData.saveFile(savePathPdf);

    I need to replace this part of code with some code that print file insted of save file

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: How to PRINT pdf invoice from docuValue

    Do I understand correctly that you have a PDF file and you want use a print driver to convert this PDF file to another PDF file?

  • 0dynTheMutant Profile Picture
    0dynTheMutant 10 on at
    RE: How to PRINT pdf invoice from docuValue

    Printing to disk = print document using win 10 printer 'Microsoft Print To PDF'.

    Manually it's looks like opening that external invoice in browser then print using 'Microsoft Print To PDF' printer, to the destination on disk.

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: How to PRINT pdf invoice from docuValue

    What is "printing to disk"? Just saving the attached file to a file on disk?

  • 0dynTheMutant Profile Picture
    0dynTheMutant 10 on at
    RE: How to PRINT pdf invoice from docuValue

    Maybe I mixed it up a bit ...

    I have an invoice registered in AX - this invoice has a report. Additionally, an invoice from the supplier is connected manually by the user. At this point, we have a report from AX and an external scan of the invoice in the form of .pdf.

    After clicking the "DoSth" button, I want to generate a pdf report to disk (I already have it handled with printJobSettings) and additionally "print to disk" the attached invoice from the system.

    Maybe I have described it better now.

  • Martin Dráb Profile Picture
    Martin Dráb 230,188 Most Valuable Professional on at
    RE: How to PRINT pdf invoice from docuValue

    What do you mean by "and attached external pdf invoice to a file"? You start with an attached file, so what else do you want to do with it?

    If you don't show any dialog, how will you know the print destination? Even if you always want to use a printer, you still need to decide which one should be used. You can't assume that there is just one printer in the company.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans