WebDav Pdf Saving error - pdf

I have set up a webdav folder that I can access thorugh chrome and edit files and save them back to the server, for example, I can open a word doc, edit it and save it back.
When I come to open a pdf, it wont save back to the server and downloads a copy of the pdf instead of the original.
Is there a way of enabling this to edit a pdf?
My end goal is to be able to open a pdf, add comments/highlights and save it back to the server, through my browser.
Thank you
Edit:
I have set this up through Apache 2.4, no plug ins through chrome, I have mapped a network drive to the server folder where I can open and edit files. Except PDFs, I would like to add comments to a off but when I open one the option is greyed out and when I try and save it after opening it tries to save to my desktop.

I'm not sure i've got your use case right, but if i've understood you correctly you have a link in a web page to a PDF which you're viewing in chrome. You click on that link and the PDF downloads to a temp file from which it is opened. If you edit and save those changes are simply saved to the temp file on your local PC. Is that correct?
If so, then this is simply normal behaviour for links in web pages. There is absolutely nothing in the HTML standard which suggests links should be opened by an editor with knowledge of the source location.
What you really want is for the link to launch an editor program which retrieves the remote document in edit mode (probably locking the remote resource) and then have edits saved back to the server. For this to happen there generally needs to be some special interaction in the browser. In Internet Explorer this is provided by the sharepoint dll and special script code. I think there's a plugin for Chrome which does the same thing, although differently.
I havent used the Chrome plugin, but i think this might help - https://code.google.com/p/npapi-msdocs/

Related

Data Studio Report not Downloading Properly

Until today I have been able to download data studio reports as pdfs and, with the exception of some content errors, it has always worked as expected. Now, rather than downloading as a pdf, the report opens as a pdf looking file with a blob:https:/ /datastudio.google.com/4138d etc. URL which according to Chrome is an insecure connection. Trying to download this file results in a "Network Error"
page that I get when selecting download as pdf
I have tried checking for malware on Chrome and cannot see anything wrong. I have also restarted my PC and refreshed data studio.
Any help or suggestions would be greatly appreciated!
I agree with #wilburforcethebrave - all dashboards were downloading without an issue until yesterday and now receiving intermittent errors such as "blob:https:/ /datastudio.google.com/4138d"
Printing the dashboard as a PDF is helpful if the report is one page, but does not work for multiple pages.
I think I found a fix though so you can download Data Studio reports in Chrome.
Click the 3 dots next to your photo in chrome (right under the 'X' button on windows)
Go to 'Settings'
Select 'Privacy and Security' from the left side menu
Select 'Site Settings' from the presented menu
Under the 'Content' section, select 'Additional content settings'
Click 'PDF documents'
Click the 'Download PDFs' button
Changing this setting will download PDFs directly to your downloads folder without opening a separate PDF window in Chrome. To make sure your downloads folder is the default folder click 'Advanced' on the left side menu then click 'Downloads'. You can change your download location from here or turn on the option to have Chrome ask where to save with each download request.
Also, downloading the reports with another browser will work too. I did not have any issues downloading reports with Firefox.
I have been having the same issue with this today, and have found a work around. Instead of downloading it in the new tab that opens, click the print button instead. From the print menu, change the printer to "Save as PDF", and it should be able to save as normal. Not sure why we had this issue but this seemed to allow us to download it as a PDF.
I do not have any problem when I export multiple pages dashboard and print as pdf. I suggest you may want to check your pdf print driver within the browser itself.

Firefox Ignores Content-Disposition

I'm trying to write MVC endpoint that will optionally set the content-disposition to inline or attachment in order to either display the file (a pdf) inside a new browser tab or else to download it. The UI allows the user to select how they'd like to open the file (not my design - can't change that aspect of it).
Note that this works in Chrome/Edge just as expected.
In Firefox, the application settings for PDF appear to trump the content-disposition. Is there a reliable way to get Firefox to respect the content-disposition? Preferably a way that will work w/ a vanilla installation of the browser such that end-users don't need to make any modifications on their end for it to work.
Here's the code I'm using to setup my response (class is derived from ApiController):
var response = Request.CreateResponse(System.Net.HttpStatusCode.OK);
response.Content = new PushStreamContent((stream, content, context) =>
{
dispatcher.Dispatch(request, stream);
}, new MediaTypeHeaderValue(MediaTypeNames.Application.Pdf));
response.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue(contentDisposition)
{
FileName = $"{auto_generated_fileName}.pdf",
};
response.Headers.CacheControl = new CacheControlHeaderValue()
{
NoCache = true,
NoStore = true
};
return response;
We have noticed this issue in our webapp as well. The webapp has a download button that lets the user download a PDF file. Firefox shows the PDF file in the current tab, which effectively kills the webapp.
After a bit of research, this appears to be an intentional feature, see the release notes for Firefox 98:
When you set an application to open files of a specific type in your Firefox preference settings, those files will open automatically, even files served by the website with "content-disposition: attachment". The same applies to PDF files that are set to open in Firefox by default. This is a fix to bug 453455.
Personally, while I can understand some users may want this for web pages that don't behave well, this is an issue for well-behaved web apps.
Setting the download attribute on the anchor does not appear to work either, Firefox still shows the file inline (tested with Firefox 99.0)
So as far as I am aware, you cannot force the browser to download the file if the browser does not allow it. Other web apps such as OwnCloud or Google Drive are having the same issue -- if you click right on a PDF file in Google Drive and then click on Dowload, Firefox still open the PDF file inline, whereas Chrome downloads it.
For now, it seems the best you can do is to open file in a new tab, to prevent the webapp or web page from being replaced by the downloaded file (which is also what Google Drive seems to be doing). You can open the download in a new tab or window e.g. via the target attribute on an <a> links or via the formtarget atttribute on a <button> element.
I found #blutorange's answer after trying to find a solution to the same problem as OP. However, just before I got here, I stumbled across this answer from back in 2013 - https://stackoverflow.com/a/16515146 which suggests to set the Content-Type header to application/octet-stream, instead of application/pdf.
I tried that solution and what do you know - it works! The PDF opens in a new tab in Firefox automatically, but at least it doesn't replace the tab of my application, so yay! Chrome doesn't seem to mind it either and my PDF viewer on my computer also recognizes the files as PDFs.
Now, this might not be the most "correct" fix to the issue we're facing, but it's an alternative to forcing open a new tab.

TFS2015 Document library- open file instead of download

when i am trying to view files from my TFS document library it's download the file instead of opening it automatic with excel OR word that are already installed on my pc, does someone know how to fix it?
i am using office365 and TFS2015 as you can see at the screenshot that attached this is how it's look like in PC that working fine.
This kind of issue may related to your IE security setting, try to add the related sharepoint site in trust site and try again:
Close your browser (if you don't and you have your SharePoint site up you'll get a bunch of script errors because of the change to access
levels).
Go to your Control Panel
Open Internet Properties
Select the Security tab.
Select Trusted Sites
Click Sites, and add the URL for your SharePoint site.
More details please refer this similar issue: "Some files can harm your computer" dialog when I open a file from the document library
If the warning dialog is disappear, but when you open file still download. Then that behavior maybe defined by your browser. Try some other browser such as IE/Chrome/FireFox. Double check the integration/link of your browser and Word,Excel.

Automating File Download of a link that looks like this: https://www.domain.com/TableData/TableA.csv

I am trying to write an application that will download .csv and .xls files and save them into a folder that will be accessed later by a VBA macro. I am posting this question after the unsuccessful use of the solution in the following link: How do i download a file using VBA (Without internet explorer)
The macro runs successfully, but the downloaded .csv file only contains the html from the login page. I find that strange because when I copy and paste the link directly into the browser without logging in, I am immediately prompted with a save, open, close window for the file.
As much as possible I am trying to avoid using SendKeys, but I can't seem to find another solution that works. I am not opposed to options other than VBA. Any help would be appreciated, thank you.
Your browser stores cookies which likely allows you to login automatically. Try browsing the page in different tabs in an incognito browser and you'll likely have to login each time.
You'll have to find a way to make the same requests your browser is sending to login, and use the cookies stored to make the requests to download the files.

IE6 opening XLSX file as an XLS file

My application generates XLSX files based on a users requirements.
After the XLSX file is generated the user is redirected to where the file is saved using Response.Redirect...
Response.Redirect("filename.xlsx")
When the user then opens the file... they recieve this message.
The file you are trying to open, 'filename.xls', is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
As a temporary fix I've instructed my users to press "Yes" when they receive this message and the file opens perfectly fine.
Does anyone have any ideas why IE6 is trying to open an XLSX file as an XLS?
Note: I have a similar application that generates PPTX files in the same manner - and these open without a problem.
I've found that it is an issue with older versions of windows server.
Both the xlsx MIME type needs to be added and there are also a couple driver updates that need to be installed (I don't know specifically which ones. Our IT department is taking care of it)
To add the MIME type: Go to IIS Manager and add the .xlsx MIME type. (Documentation).
The MIME type that needs to be added is:
File Extension: .xlsx
MIME Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Further information on this can be found here: http://technet.microsoft.com/en-us/library/ee309278(office.12).aspx
I think, you cannot solve that problem by hosting or etc. it depend on your computer...
Here is the fix from Microsoft website ;
To configure Internet Explorer to open Office files in the appropriate Office program by using the Folder Options tool:
Open My Computer.
On the Tools menu (or the View menu), click Folder Options (or click Options).
Click the File Types tab.
In the Registered file types list, click the specific Office document type (for example, Microsoft Excel Worksheet), and then click Advanced (or click Edit).
In the Edit File Type dialog box, click to clear the Browse in same window check box (or click to clear the Open Web documents in place check box).
Click OK.
Here is the link http://support.microsoft.com/?scid=kb%3Ben-us%3B162059&x=13&y=13