Content type of .numbers files

Dear team ,
please tell me the "contenttype" of the .pages file format....
example: .doc....is having the content type as "application/ms-word"
similarly can u tell me content type of .pages
Regards,
spradeepkumar

If the document is a Numbers '09 single file,
package folder = false
kind = "Document Numbers" (localization dependant )
type identifier = "com.apple.iwork.numbers.sffnumbers"
If the document is a Numbers '08 or 09 package,
package folder = true
kind = "Document Numbers" (localization dependant )
type identifier = "com.apple.iwork.numbers.sffnumbers"
Yvan KOENIG (from FRANCE lundi 12 janvier 2009 11:06:20)

Similar Messages

  • Content type of .key files

    Dear team ,
    please tell me the "contenttype" of the .pages file format....
    example: .doc....is having the content type as "application/ms-word"
    similarly can u tell me content type of .pages
    Regards,
    spradeepkumar

    hi balusC thanks, it works very well.
    your site http://balusc.xs4all.nl/srv/dev-jep-pdf.html helped me a lot.
    But one point. There is another method : URLConnection.guessContentTypeFromStream(InputStream)but it don't work and i receive as result a null.
    Is there another classes/methods which helps getting the content type of a file? not necessarily from sun. thanks
    bye

  • Set content type based on file extension after uploading into document library

    when there are multiple content types associated with a document library, say, report builder report, and excel documents, after you drag and drop a document into the document library, content type will not be detected based on the file extension. Suppose
    your default content type is document, and you had added the report build report content type, and you uploaded a .RDL file, the content type for the file will be set to the default document content type.
    I get a requirement to update the content type automatically based on the file extension, what follows is my code:
    public class setCNTByFileExtItemAdded : SPItemEventReceiver
    /// <summary>
    /// An item was added.
    /// </summary>
    public override void ItemAdded(SPItemEventProperties properties)
    if (properties.Web.GetFile(properties.AfterUrl).Exists)
    SPListItem CurrentListItem = properties.Web.GetFile(properties.AfterUrl).Item;
    String FileName = CurrentListItem.Name;
    if (FileName.EndsWith(".rdl",StringComparison.OrdinalIgnoreCase))
    CurrentListItem.Properties["ContentTypeId"] = "0x010100C3676CDFA2F24E1D949A8BF2B06F6B8B";
    CurrentListItem.SystemUpdate(false);
    base.ItemAdded(properties);
    What follows are references that helped me:
    http://stackoverflow.com/questions/7984300/properties-listitem-is-null-in-itemadded-event-while-uploading-documents-using
    http://williamvanstrien.blogspot.in/2011/10/read-content-of-uploaded-file-within.html
    http://blogs.msdn.com/b/manuj/archive/2009/09/22/itemadded-event-on-document-library-the-file-has-been-modified-by-on-error.aspx
    http://support.microsoft.com/kb/2647429

    user may have further requirement to detect whether the uploaded .xlsx file contains powerpivot data model, i tried the following code, the caveat is that .xlsx is actually a zip file, i just test whether the uploaded stream contains an entry xl/model/item.data.
    public partial class ApplicationPage2 : LayoutsPageBase
    protected void Page_Load(object sender, EventArgs e)
    if (this.IsPostBack)
    if (FileUpload1.PostedFile == null)
    return;
    string destWeb = DestinationUrl.Url;
    string destUrl = destWeb + "/" + FileUpload1.FileName;
    using (SPSite site = new SPSite(destWeb))
    using (SPWeb web = site.OpenWeb())
    SPFile f = web.Files.Add(destUrl, FileUpload1.PostedFile.InputStream);
    if (FileUpload1.FileName.EndsWith(".xlsx") )
    Stream fs = f.OpenBinaryStream() as Stream;
    using (ZipArchive zfs = new ZipArchive(fs, ZipArchiveMode.Read))
    if (zfs.GetEntry("xl/model/item.data") == null)
    Debug.WriteLine("Does not contain data model");
    else
    Debug.WriteLine("Contain data model");
    The code i posted here is part of an application page in layout folder, the reason why i use application page is described in
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/065d010a-d37e-4da4-9873-172ab2c50d6d/custom-list-new-application-page-with-listfielditerator-and-savebutton?forum=sharepointdevelopment#288a686e-bfbe-41aa-83d0-58a80f0cec07

  • Content type of .pages file format

    Dear team ,
    please tell me the "contenttype" of the .pages file format....
    example: .doc....is having the content type as "application/ms-word"
    similarly can u tell me content type of .pages
    Regards,
    spradeepkumar

    For Numbers it is:
    kind = "Document Numbers" (localization dependent )
    type identifier = "com.apple.iwork.numbers.sffnumbers"
    For Pages it is:
    kind = "Publication Pages" (localization dependent )
    type identifier = "com.apple.iwork.pages.sffpages"
    For Keynote it is:
    kind = "Keynote Document" ( not sure of localization behavior)
    type identifier:"com.apple.keynote.key"
    grab it with this script after changing the pathname
    set pathName to (choose file) as text
    tell application "System Events"
    get properties of item pathName
    end tell
    Yvan KOENIG (from FRANCE lundi 12 janvier 2009 16:31:07)

  • Changing content type of xml file to pdf

    Hello,
    I have an xml file (extension is *.xdp) which can locally be opened with Adobe Reader and displays as a regular pdf file. Adobe has a technology that allows xml to be merged with a pdf shell, and thus populating the pdf file with the values retrieved from the xml file.
    My issue is that I want this to be done on an application server level (jboss in particular). In a servlet, I stream the xml file for the contents to be printed out within a browser (IE). I specify the content type to be application/pdf, however, the data is not being displayed within Adobe Reader, but rather as a regular xml file.
    Any help is greatly appreciated. Here is the code below:
    response.setHeader("Pragma", "public");
    response.setHeader("Cache-Control", "max-age=30");
    response.setContentType("application/pdf");
    ServletOutputStream out = response.getOutputStream();
    byte[] fileBytes = readFile();
    out.write(fileBytes);

    Yes, the xml does contain a reference to the shell pdf. This works fine if I do so manually (open the xml file using Adobe Reader). However, through a browser, it seems that the forced content type is completely ignored:
    <?xml version="1.0"?>
    <?xfa generator="XFA2_0" APIVersion="1.4.4127.0"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
    <xfa:datasets xmlns="" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:data>
    <DocRoot>
    <Cldemographics<Cldatecreated>7/21/05</Cldatecreated...
    </DocRoot>
    </xfa:data>
    </xfa:datasets>
    <pdf href="/opt/jboss-tomcat-server-build-4.0.0-2/.../pdfShell/Shell.pdf"
    xmlns="http://ns.adobe.com/xdp/pdf/"/>
    </xdp:xdp>

  • Setting Content-Type in .jspx file

    Hello,
    My application is not rendered by an HTML Browser.
    I need to set the contentType to application/x-ywidget+xml in my JSPX file.
    The content type returned is always text/xml !!!
    I have tried:
    1. To create a phaseListener and overloading before or after phase in ANY_PHASE
    FacesContext context = FacesContext.getCurrentInstance();
    ExternalContext extContext = context.getExternalContext();
    HttpServletResponse response =
    (HttpServletResponse)extContext.getResponse();
    String contentType = "application/x-ywidget+xml";
    response.setContentType(contentType);
    2. To add a new MimeType extension in web.xml and create my file under this extension
    <servlet-mapping>
    <servlet-name>jsp</servlet-name>
    <url-pattern>*.xygo</url-pattern>
    </servlet-mapping>
    <mime-mapping>
    <extension>xygo</extension>
    <mime-type>application/x-ywidget+xml</mime-type>
    </mime-mapping>

    Frank,
    Thanks you for you help.
    What i would like to do is to use a JSF library components to build YahooGO pages (Yahoo mobile widgets).
    For this my server needs to return an xml document with the application/x-ywidget+xml content type.
    Regarding you question i don't think that the target device understand the HTML.. on my mobile, it's J2ME application...
    Perhaps you can provide me some advices.
    Regards,
    Fred

  • Abstract way to get Content Type of a File?

    Using a java.io.File or java.io.FileInputStream is there any was the get the mime type of that file? I am working with a JEditorPane which loads files from a JTree, however I would like to take advantage of the tree's setContentType method for formatting...

    I think the
    JAVABEANS ACTIVATION FRAMEWORK (JAF)
    is what you're looking for.
    http://java.sun.com/products/javabeans/glasgow/jaf.html
    But I actually never used it... (or not yet :-) )
    Greets
    Puce

  • Urgent: How to set content type on upload depending on target folder?

    Hi,
    i have to set the content type of a file uploaded via SMB depending on the folder the file is placed in. All files placed below a certain root directory have to be of my custom content type. All others should be stored as documents of type "Document". Is there an easy way to accomplish this task? I can't assume any specific file extensions and can therefore not register my custom content type to that extension.
    Any hints are welcome.
    Thanks.

    Hi,
    i have to set the content type of a file uploaded via SMB depending on the folder the file is placed in.All files placed below a certain root directory have to be of my custom content type.
    +++ Use an agent to verify the name and extension using the IfsEvent class and EVENTTYPE_CREATEINSTANCE
    All others should be stored as documents of type "Document". Is there an easy way to accomplish this task?
    +++ Those that aren't your custom content type move to a different folder using the agent.
    I can't assume any specific file extensions and can therefore not register my custom content type to that extension.
    +++I've found that registering content type only really affects things like how a browser knows what kind of file it's downloading/looking at (mime type) or how a renderer knows how to render it.
    Any hints are welcome.
    Thanks.

  • How do I set the content type ?

    Hi
    I have to upload a file from my Java Application to a remote servlet.
    I have used the HTTPConnection class to connect to the remote servlet and made it call the POST method explicitly.
    How do I set the content type of the file I am uploading from my Java apllication?
    I tried to change the content type in the doPost method. by giving
    req.setContentType("multipart/form-data"); in the doPost.
    It still doesnt work..
    Is there any way to set the content type in the Java application?
    Thanks in advance

    What class is your req variable? If your using a HttpServletRequest, then there is no method req.setContentType("");
    In the HttpServletResponse this is for telling the web browser or receving medium what kind of mime type to expect.
    And what package is the HttpConnection class from?
    I think more precise info is required before this question can be answered.

  • Content Type problem

    I am trying to retrieve the content type of a file.
    String strContentType ="";
              File file = new File(fileName);
              FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;
               if ( fnmMime != null ) {
                      strContentType = fnmMime.getContentTypeFor ( "file://c:2.avi" ) ;
    System.out.println(strContentType);It works perfect for image, video , sound formats, but it gives null for microsoft office documents and openoffice documents.
    can anyone help me?
    Thanks in Advance.

    Nirav-P-Thakar wrote:
    FileNameMap  fnmMime        = URLConnection.getFileNameMap ( ) ;
    fnmMime.getContentTypeFor(fileName);
    URLConnection.guessContentTypeFromName(fileName);I have tried out both methods but it returns null when the file is of type MS Office or Open Office.In reply 1 BalusC said..
    "Alternatively you can use ServletContext#getMimeType() for this. It guesses the content type based on the mime mapping as it is been definied in the web.xml of the application server and the webapplication. If it returns null, then you need to add new <mime-mapping> entry to the web.xml."
    I would try doing it this way. Try including entries for the mime mappings in the deployment descriptor of the web application.

  • Setting attachment content-type manually?

    Hello,
    I am trying to write code that will allow a user to specify the content-type of an attachment when s/he adds it to an email. The following code, which appears to let Java figure out the content-type from the file extension, works just fine:
    Multipart multipart = new MimeMultipart();
    // Part one is the text
    BodyPart bodyPart = new MimeBodyPart();
    bodyPart.setText("Some text");
    multipart.addBodyPart(bodyPart);
    // Part two is the attachment
    bodyPart = new MimeBodyPart();
    DataSource sourceFile = new FileDataSource(FileName);
    bodyPart.setDataHandler(new DataHandler(sourceFile));
    multipart.addBodyPart(bodyPart);
    message.setContent(multipart);
    I attached a .exe file, passed the DataSource into the DataHandler constructor, and it sent the email as expected, with a Content-Type of application/octet-stream. However, if I do the following instead:
    bodyPart.setContent(fileDataSource, "application/octet-stream");
    -or-
    bodyPart.setDataHandler(new DataHandler(fileDataSource, "application/octet-stream");
    I get the dreaded javax.activation.UnsupportedDataTypeException: no object DCH for MIME type application/octet-stream. Why do I get this exception when using setContent, but not when I use the DataHandler? It seems it has the same Content-Type either way.
    -Aaron

    Well, I figured out the answer myself by digging into the source code.
    When you create a DataHandler by using the (Object, String) constructor, it expects an Object that is not a DataSource, or so it would seem. So I abducted the BinaryArrayDataSource from the demo classes and instantiated one of it, specifying my desired content type and passing in the FileInputStream from the file that I was creating my FileDataSource from, and it worked like a champ.
    So, the moral is, use DataSources whenever possible!
    -Aaron

  • AS2 File name preseve - can we force the file name to be in Content-Type

    Ref: http://www.b2bgurus.com/2007/11/as2-file-name-preserve-feature.html
    Our TP wants file name to be part of Content-Type of MIME rather than Content-Disposition. is this possible in Oracle B2B?
    Thanks,
    Kalyan

    Hi Ramesh,
    Older applications still use "name" parameter of content-type to identify and further process the document
    I think B2B should provide a way to include "name" parameter as part of content-type for backward compatibility
    Expected by our TP
    Content-Type: application/pdf; name="example.pdf"
    Content-Transfer-Encoding: base64
    few links to throw some more light on the topic
    http://osdir.com/ml/ietf.rfc822/1996-03/msg00000.html
    http://pear.php.net/bugs/bug.php?id=4057
    h3. expert from wiki
    The original MIME specifications only provided a means to associate filenames with application/octet-stream parts. This was done through the use of a name= parameter on the content-type. The theory here was that filenames were mostly used for type information and therefore did not need to be present in most cases. It was a mistake. The specification of content-disposition attempted to provide a more general means of providing file name information by defining a filename parameter as part of the content-disposition field

  • File created with Document Content Type will not be saved back to Sharepoint library

    Recently some of our users, after upgrading to Windows 8.1 with Office 2013, intermittantly are not able to save files created using  document content types template back to sharepoint library. Instead the location is set
    to their local storage. The same templates used by Windows 7 users with Office 2010 are working fine. Setting the SP sites as Trusted location in IE and Clearing IE Cache did not help. Adding the SP site in Word Trusted Location did
    not help. Any suggestions how this can be resolved is appreciated. Thanks.     

    Hi,
    According to your post, my understanding is that you could not save office file back to the SharePoint Document library.
    It may have to something with your Word Settings. When you click new and it opens in MS Word, word treats it as unsafe because perhaps it is not saved. To make it work:
    Go to Word (2013) -> File Menu -> Options -> Trust Center -> Trust Center Settings
    -> Protected View Tab -> Uncheck "Enable Protected View for files located in potentially unsafe locations" (2nd option)
    Here is the similar post, you can take a look at:
    http://blogs.interfacett.com/word-2010-not-saving-back-to-sharepoint-2010-by-default
    If the issue persist, you can also check the event log and ULS log to see if anything unexpected occurred.
    To check event log, click the Start button and type “Event Viewer” in the Search box.
    For SharePoint 2010, by default, ULS log is at:
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Unable to change content types for pptx, xslx and docx files

    I'm running into an issue where I cannot change the content type of any xml-based Office documents. Here's what I've done:
    1 - Create a custom content (A) type based off the Document content type
    2 - Enable the custom content type in a document library
    3 - Add a document or select an existing document and edit the content type to the custom content type
    4 - The custom content type will save for documents such as .ppt, .doc, etc. The custom content type will now save for .docx, .pptx or .xlsx files. The properties window will save without displaying any errors but the content type will not change
    I ran several tests including creating another custom content type (B) based off of the Document content type. I proved that:
    The custom content type (B) can be saved to .docx, .pptx or .xlsx files IF no additional columns are added to the custom content type
    As soon as I add a column to the custom content type the aforementioned documents cannot be saved as that custom content type 
    Documents created through the File option in a document library also fail to change content type to the custom content type when saved. Most of my files are .docx, .pptx, or .xlsx files, and this issue poses a significant roadblock in our SharePoint roll-out.
    I appreciate any advise you can provide.

    Hi,
    According to your post, my understanding is that the custom content type could not save with .docx, pptx and xlsx files when with a additional column.
    I tested with your issue as the steps below, the custom content type worked well.
    Create a custom column Doc1
    Create a custom content type Doc1, the parent content type from chose the Document Content Types, Parent Content Type chose Document.
    Add the custom Doc1 to the custom content type Doc1.
    Add the custom content type into the library LIbA.
    Upload the files with .docx, .pptx and .xlsx files into the library with the custom content type, they all save well with the custom content type.
    I also create other content type with other Parent Content Type, they all worked.
    Did the issue occur in other library? You can create a new library then use the custom content type to check whether it works.
    You can also use the other browsers to check whether it works, such as Chrome, Firefox.
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Not seeing Portable Document File in the Content type listing

    Newly downloaded and installed Firefox doesn't have Portable Document File format option in the Content Type listing. I have downloaded Adobe Reader 11 which is working fine parallely. The Plug-in's and Add-Ons have all been set correctly.
    Basic issue, not able to view PDF files via Firefox

    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them
    *https://support.mozilla.org/kb/disable-built-pdf-viewer-and-use-another-viewer
    You can rename (or delete) the mimeTypes.rdf file in the Firefox profile folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder (Linux: Open Directory; Mac: Show in Finder)

Maybe you are looking for

  • Out of memory error in JDBC sender adapter

    Hi I am inserting a large data set using a sender JDBC adapter into a single table in an MSSQL server. Theoretically I could use statement batch mode to increase throughput. However if I set the batch flag I get an "insufficient system memory to exec

  • XML output in smartform

    Hello, My requirement is to create xml file from a smartform and iam able to do that fine but iam not sure how to create XSL file to view the xml output. Thanks for your help.

  • ITunes automatically quiting

    Whenever I try to open iTunes I get an error message saying that iTunes has encountered a problem and needs to close. It sent me a link to try and fix it but it didn't work. I've also sent an Error Report countless times. I'm getting kind of mad caus

  • SAP Query- Is summation possible

    Dear All, Pls let me know if we can do summation in SAP Query to get a count on positions for example. Eg. If i ve say 25 positions in the system pulled out by through Query, can i be able to sum them up saying the count is "25" in SAP Query. Points

  • Outlook Email Reply Info

    Does anyone know if you can remove the date/time information that gets added to an email messages when replying on your iPhone. We are using Exchange 2007. Example of what I would like to remove from the message. On Jul 27, 2011, at 7:49 AM, "Smith,B