How to set/open document into readOlny from graph API.(One drive) - graph

I am working on Word , Excel and PowerPoint add-ins . I want to upload document from graphs API .Below are API PUT https://graph.microsoft.com/v1.0/users/**myuser#domain.subdomain.com**/drive/items/root:/filename.docx:/content and it is working fine from Postman .
But I want to open this document as protected view or read only view . Any graph API available for change document as protected view ?.

Related

create .pdf files automatically centura

i'm working in Centura 2.1 team developer and I want to generate (.pdf) files direct from the system and every .pdf file has a unique name according to the data inside this file.
how can I do it ?
Try to look at the page:
https://samples.tdcommunity.net/index.php?dir=
Here is a lot examples working with PDF.
After TeamDeveloper v5 you can use SalReportPrintToFile() which creates a PDF.
Otherwise you could install PDF995 ( free ) and call some of its many functions if you don't want to use Acrobat Writer ActiveX.

Analysing data within Alfresco

I am new to Alfresco and I want to analyse the data present(no of files, size e.t.c., ) in an Alfresco system using C# . I am writing code following the below steps:
Get the login token
Get List of Sites inside Alfresco
Foreach site, get the list of Document libraries
Foreach document library, get all of its contents
Foreach file, get its info.
Is there any better approach than this?
1, 2, 3 & 4 are already available in AAAR

TxTextControl Load a Image into document Dotnet

I am new to TXTextControl. I am currently using TXTextControl 24 version.
I need to upload an image from local system (Client system) into the document.
I have written the JS for uploading the file through .
The JS makes a call to backend service which gets the file, Add it to a new RTF file and respond back to JS. The RTF file is then loaded to the Selection.Load of TextControl.
Code: add image to RTF
TXTextControl.ServerTextControl tx = new TXTextControl.ServerTextControl();
tx.Create();
tx.Images.Add(myImage, tx.InputPosition.Page, new Point(100, 100), TXTextControl.ImageInsertionMode.FixedOnPage);
string sHTML;
tx.Save(out sHTML, TXTextControl.StringStreamType.RichTextFormat);
The server responds back with with message "The Module for displaying image is obsolete. (01-0803)"
How can I add the Image into the TXTextControl Document ?

xls form for conducting survey using android phone

Am working on an xls survey form which when I loaded onto ODK to look for errors it produced this error"You must have a sheet named(case-sensitive):survey"which I dont quite understand.
It's referring to the worksheet in your excel file. Instead of the normal "Sheet 1" etc it needs to be named "survey".
I recommend you use http://ona.io to load and manage your forms. You can sign up and create an account there.. then your profile URL becomes the server URL that you have to enter in the ODK Collect app on the phone. They have given a basic example xlsform that should help you get started.. https://ona.io/examples/
Further documentation on making XLSForms : http://xlsform.org

ASP.Net How to access images from different applications

I have 2 different project. One is supposed to upload images (admin) and the other is supposed to show them.
I was writing something like "/Contents/images/image path"... But wait! I will I upload the images from the application into that address?
Any help and suggestions please.
If you have two applications that will interact with the same files, it's probably better to have an ImageController with an action that allows you to upload/download the image rather than storing them directly as content. That way both applications can reference the same file location or images stored in a database and manipulate them. Your download action would simply use a FileContentResult to deliver the bytes from the file. You can derive the content type from the file extension.
Example using a database. Note that I assume that the database table contains the content type as determined at upload time. You could also use a hybrid approach that stores the image metadata in a database and loads the actual file from a file store.
public class ImageController : Controller
{
public ActionResult Get( int id )
{
var context = new MyDataContext();
var image = context.Images.SingleOrDefault( i => i.ID == id );
if (image != null)
{
return File( image.Content, image.ContentType );
}
// or you could return a placeholder image here if appropriate.
throw new HttpException( 404, "The image does not exist" );
}
}
An alternative would be to incorporate your administrative interface in an area of the same application rather than in a separate project. This way you could reuse the content/images directory if you wanted. I find that when you have dynamic images the database or a hybrid approach works better from a programming perspective since it's more consistent with the rest of your data model.
you could try like this..
Let's assume that all of your images are in Project A and you want to use the same images in Project B.
Open Project B with Visual Studio. In the Solution Explorer, right click your Project Name and select "Add Existing Item...".
Browse to the physical location on disc where your images in Project A are stored and select the files that you want to import.
You'll then be able to access those images from project A in Project B.

Resources