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.
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
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?
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.
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#.
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
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?
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.
What is "printing to disk"? Just saving the attached file to a file on disk?
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.
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.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156