Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2022 Release Wave 1 PlanDynamics 365 release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.
2022 release wave 1 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
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.
What do you have in DocuValue? A PDF file? Or something else?
If you already have the report printed to PDF, what problem do you intend to address by creating a custom report? The report already did its job and created a file, didn't it?
Martin, initially, I may have misspelled my situation.
I got PDF file in DocuValue - it's not report from AX. It's external pdf document imported manualy by user. This are external invoiced from customers (recipients and suppliers).
Now i need to print (not save) this file as pdf.
The usual process in such a case is opening the file in an appropriate application (such as Adobe Reader or a web browser that can handle PDF files) and printing it from there.
It seems that you want something else, but I'm not sure what. Can you describe the requested behaviour, please?
After clicking the button, I want to print a pdf report (done) and attached external pdf invoice to a file. I need to find some solution to make it work from code - no user interaction (except of single click at the beginning).
Now I just use BinData to save that external PDF invoice as file - but i need that pdf to be printed insted of saved ( printed pdf does not have encryption, and that's what i need later).
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.
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 is "printing to disk"? Just saving the attached file to a file on disk?
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.
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?
Yes, thats correct - don;t ask why i need it...
binData = new BinData();
I need to replace this part of code with some code that print file insted of save file
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#.
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.
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?
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
Business Applications communities