Now Available in Community - New TechTalk Videos for 2020
2020 release wave 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
I have an assignment to display pdf documents within a form in D365FO / AX7.
To that end I have used the new Document Viewer control, and it displays the pdf's nicely.
One major drawback: It always defaults to a thumbnail size of 450 x 465 pixels, no matter how I change the width and height mode.
And it is really a requirement, that the embedded pdf is able to take up more screen space than that, when viewing the files.
I'm on 8.0 update 15, but I haven't had the possibility to test a newer version.
Did you ever find a solution for this. I mean the control is brilliant, but as for you I cannot seem to size it.
No, I haven't a solution yet. I have heard from other parties as well, that this is an issue many are strugling with, but I haven't heard of a solution for it yet. For now, I call the pdf in a pop-up/new Tab until Microsoft will fix the viewer.
As a workaround: It works fine when you base the control on any other datasource than DocuRef. I initially extended DocuRefImageAnnotatorController and pass the buffer as if it is coming directly from the referenced table, which fixes the sizing issue. A cleaner solution is to do that using chain of command on the parmCommonBuffer() method, this way you could theoretically also fix standard Ax.
Looks great. Sorry for the late reply.
Could you share a little more detail though? Because I can't replicate your solution.
I have set the referenced table as datasource on the viewer instead of Docuref, but I can't see in the DocuRefImageAnnotatorController where I should extend it. Running a debugger on both annotator classes does not reveal much either.
Methods parmCommonBuffer, getImageList and createContainerDocument are run. But the DataSource_OnActivated method on the DocuViewerContainer class hides the container. Is that the one to extend instead?
Apologies, I did not get any notification of a reply to this thread :(
You do not have to extend the control, just extend DocuRefImageAnnotatorController and override the parmCommonBuffer() method. Inside this method find the record referenced by DocuRef, and return that, instead of DocuRef itself.
Remember to specify your extended class as the Image Annotater Controller class on the control properties.
It has been a while, but IIRC this was all that was needed. A quick look shows me I also overrode getImageList(), but I believe that was for a different purpose.
Can you share your source code ? I have same problem as you. thanks.
Business Applications communities