MessageDocNotDisclosedError shown in LiveCycle HTML Workspace ES4 with IE - livecycle

I have an Adobe LiveCycle process that flattens a PDF form and displays the result to users in LiveCycle HTML Workspace ES4. The flattened form appears fine in Firefox and Chrome browsers however when viewing the same form in Microsoft Internet Explorer a "Message from webpage" window is prompted with this message: "MessageDocNotDisclosedError: Target document not disclosed."
The flattened form appears fine in IE and the application still works however I would prefer to get rid of this prompted error message. Is there a way to avoid this error message in IE?
I have seen this error message with flattened documents in the following environments:
Windows 7 / Internet Explorer 9 / Adobe Reader 11 add-on
Windows 7 / Internet Explorer 11 / Adobe Acrobat Pro 11 add-on

How are you returning your flat PDF? Are you flattening the PDF as part of the LiveCycle application and using a document variable, or are you using a custom render process? Also is the PDF document still opened through your Reader/Acrobat plugin in Firefox and Chrome?
Sounds like you have a Forms Bridge issue. When using a render process (Configurable from your Action Profile on the Assign Task activity or from the XDP template in Workbench) the default render process will inject JavaScript inside the PDF to communicate with the Workspace frame. If you're not injecting this script, the PDF and frame won't be able to communicate. If this is the case, the best way to fix this would be to:
Copy the Process Management (System)\Render PDF Form process into your application
Edit the process to return a flattened PDF instead of a dynamic one
Edit you form's action profile to use the new render process.

My team was able to get rid of the "MessageDocNotDisclosedError" message in Internet Explorer by reverting back to an earlier build of LiveCycle HTML Workspace. We reverted back from version 1.1.30 to version 1.1.14 and now the message no longer appears.

Related

RDLC External Image works in ASP.NET but not in WPF

I have lots of RDLC reports in an ASP.NET app, many generated dynamically (manual manipulation of .rdlc XML file).
Many have external images (EnableExternalImages=true, full https://... url of image passed to report as a parameter).
Reports and images work fine in ASP.NET app (via ReportViewer control).
I am now building a WPF app that uses the same code to generate PDF files from the .rdlc reports.
For the most part the reports work just fine in both ASP.NET and WPF. Both use LocalReport.Render("PDF") to generate a PDF file. The only exception is where external images are used - the report does not seem to be able to render external images in WPF. If I replace the external image with an embedded image it works fine. The URL is definitely correct in the WPF app (works if pasted into browser).
I have tried http and https, and "run as administrator" - same results. The actual error message is typically unhelpful and just seems to be a generic "something wrong" message ("The subreport 'Subreport1' could not be found at the specified location Custom1. Please verify that the subreport has Page 1").
Any ideas?
Doh! As usual the problem was my own stupid mistake, made worse by unhelpful error messages.
LocalReport.Render("PDF", ..., out warnings) has a version that includes an output parameter for Warnings which in this case gave me a precise reason for the malfunction: EnableExternalImages was NOT set as I thought (test all your ASSumptions!) (why don't they show this message in the report instead of the useless generic message, would have saved me a lot of time!).
EnableExternalImages turned out to be set in aspx markup, and not in the RDLC generator code, thus it worked in ASP.NET but not in WPF. I now set it in the code and it works in both apps as expected.
I have read many posts about external images not working in PDF - they definitely work just fine in PDF (and Word), at least with Microsfot.ReportViewer2015.Runtime v12.0.2.2402. What often does not work however is displaying the images in IE in the online (in-browser) preview of the report - half the time they show and half the time they do not show, but they always show in the PDF.

How to get file download complete status using selenium web driver c#

I am writing a automation script using selenium web driver for downloading multiple files one by one from a web site in Mozilla fire fox. I have downloaded first file successfully and next time I need to wait for download to complete. Can anybody help how to identify an ongoing download is completed using c# selenium web driver.? Since I am not getting the download complete status, I am unable to continue downloading next file.
Assuming you are testing file downloading in Firefox as you mentioned. Here is an approach to achieve what you want.
Open new window/tab in Firefox and navigate to 'about:downloads' directly.
i.e. driver.Navigate().GoToUrl("about:downloads");
You will get the list of downloads (i.e. already downloaded files and the file which is being downloaded currently.)
You will have to switch between your site tab and downloads tab.
Now on downloads tab, looking at HTML, you can easily find out in progress download using state or status attributes.
For example, for the first file in the list, if state="0" and/or status
contains the text 'remaining', it means downloading is in progress
So you can wait till state becomes state = 1 and/or status does not contain >the text 'remaining'
Refer the attached screen shot.
The explanation I gave here looks very high level, but I am sure this approach will work. It is simple too.
Let me know if you have any queries on this.

Access Specific PDF Page in WPF WebBrowser Control

I have a webbrowser control in my application that is used to display pdf files that have been created in iTextSharp and are stored locally on the hard drive.
I would like to be able to navigate the file (next, previous, first, last, toc) from my application rather than using the inbuilt nav of the reader in the browser.
I have seen that you can navigate to specific pages by using
Browser.Navigate("filename.pdf#page=?);
This works the first time but when trying to navigate to a different page, it makes the browser disappear completely with no errors. However, I can reload the file without problem if I don't have the #page=? suffix on the file url though. Any ideas on this?
Alternatively, is there anyway in iTextSharp of adding something to the file to allow for it to be navigated from an external command?
All the official parameters that can be used to navigate through a PDF using parameters in the query string after the ? character are listed in a document published by Adobe: Parameters for Opening PDF Files
You already mentioned the page parameter. Another option could be using named destinations: nameddest=destination. In this case, you need to add the anchor with name destination to the file using iTextSharp.
Note that not all viewers implement these parameters. Adobe supports them in Adobe Reader and in the Adobe Reader plug-in, but there is no guarantee that they will work in pdf.js (Firefox), Pdfium (Google Chrome),... If your browser disappears when using an open parameter, you may have hit a bug in the browser or the viewer plug-in that causes the browser to crash. iTextSharp nor iText can crash a browser ;-)
There are no other ways you can navigate a PDF from an external application. The only thing you can do, is to add JavaScript to the PDF so that it always opens at the same page. This is done using an open action. I don't think this solves your problem as it would mean that you have to change the PDF file every time you want it to open at a different page.

Cannot debug Silverlight application running through VS 2010

I have an start up page called Default.aspx . Have written an javscript function inside the Head tag which opens an other aspx page and closes this page . The other aspx page of mine has silverlight object/ content render on that page . Due to this my debugger doesnt gets attached to the running silverlight application , also when i go to manually attach to the running Silverlight Application it doesnt works , i saw that type of process shown is script / silverlight / x86.
I am doing this all as my login page is only created in silverlight .
Any one have idea how can i get debugger atached.
Edit :
Below link explains the same what i am facing :
Visual Studio Attach to Process - change default automatic code type (Silverlight instead of Script)
To enable Silverlight debugging:
Right click on the Web project hosting the Silverlight application in Solution Explorer
Select "Properties"
Click the "Web" tab
Check the "Silverlight" box in the "Debuggers" section
I had problems debugging Silverlight in Chrome, while in IE it worked like a charm
A very nice utility is the WoVS Default Browser Switcher which can be installed using the Extension Manager (Tools | Extension Manager...)
This tool allows you to set the default browser to be used when debugging your project. In my experience Visual Studio only connects well to IE.
Using the tool I can keep another browser as my default browser but use IE for debugging.
Just use IE as default browser.
It doesn't work properly until you check silver-light debug checkbox and use IE as the others told.
By the way set web application as start-up project.

Silverlight and XtraReports - opening generated PDF report in new tab in browser

I'm trying to send a PDF file from a WCF to silverlight client. PDF is generated by DevExpress XtraReports (in method XtraReport CreateReport(string reportTypeName, RootGenericReportParameterContainer reportInformation)).
Acually PDF is saved somewhere on clients computer after choosing save path in file save dialog - DevExpress takes care of everything - but I don't have a clue how to open the PDF in new tab in browser.
And here is another problem. Silverlight 4 has no access to local file system right? So information about local PDF location is useless. Maybe it would be better to save the PDF in WCF and send a link to it to the client - but how?
I would first question why you need to send the file to the Silverlight client. Get rid of that requirement and the solution becomes much simpler. Silverlight can provide a link that opens a new browser tab. That link would be handled by the web domain, processing it as an HttpHandler, generating the PDF file for the browser. Your PDF url doesn't have to reference a physical file, you can still generate it on request, handle querystring values, etc... Lots of different ways to do this.
Seems that the question isn't really about DevExpress or Silverlight - you're just looking to open a [document of some kind] in a new tab. Each browser natively handles things differently, and users can change tab handling to whatever they want. And (as you mentioned) once the user has downloaded the file, you no longer control it.
Your best bet (and the way I do it) is probably to have a link pointing to a handler/file using "target='_blank' " in the anchor tag on the webpage. From the server side, you would want to set the "Content-Disposition" header to "Inline" to indicate to the browser that the document should be displayed in place instead of downloaded ("Attachment").

Resources