Pages document

  • Hi,
    Is a way to read and display properly a document created with Pages?
    I mean as well as we can do with PDF, DOC, RTF...

    Best Regards
    --
    Lorenzo
    email: <archidea...>
  • On 9/13/07, Lorenzo <archidea...> wrote:
    > Hi,
    > Is a way to read and display properly a document created with Pages?
    > I mean as well as we can do with PDF, DOC, RTF...

    Yes, with Pages.

    -Shawn
  • *cue laugh track*
    No, in all seriousness, I think he has a good point. We can load up
    RTF files into our NSTextViews with only a few lines of code. I don't
    think it's too much to ask that Pages documents be supported with a
    similar API. (To the best of my knowledge, the answer is "no, there
    is no API for this in Tiger.")

    On Sep 13, 2007, at 5:04 PM, Shawn Erickson wrote:

    > On 9/13/07, Lorenzo <archidea...> wrote:
    >> Hi,
    >> Is a way to read and display properly a document created with Pages?
    >> I mean as well as we can do with PDF, DOC, RTF...
    >
    > Yes, with Pages.
    >
    > -Shawn
  • Thanks John, probably Shawn didn't know that with a few Cocoa APIs we can
    quite read and display RTF, RTFD, PDF, DOC, HTML files.

    readRTFDFromFile
    initWithData (NSString)
    ImageRepWithContentsOfFile (NSPDFImageRep)
    ...
    readPagesFromFile would be welcome too.

    Best Regards
    --
    Lorenzo
    email: <archidea...>

    > From: John Stiles <JStiles...>
    > Date: Thu, 13 Sep 2007 17:21:04 -0700
    > To: Shawn Erickson <shawnce...>
    > Cc: Lorenzo <archidea...>, <cocoa-dev...>
    > Subject: Re: Pages document
    >
    > *cue laugh track*
    > No, in all seriousness, I think he has a good point. We can load up
    > RTF files into our NSTextViews with only a few lines of code. I don't
    > think it's too much to ask that Pages documents be supported with a
    > similar API. (To the best of my knowledge, the answer is "no, there
    > is no API for this in Tiger.")
    >
    > On Sep 13, 2007, at 5:04 PM, Shawn Erickson wrote:
    >
    >> On 9/13/07, Lorenzo <archidea...> wrote:
    >>> Hi,
    >>> Is a way to read and display properly a document created with Pages?
    >>> I mean as well as we can do with PDF, DOC, RTF...
    >>
    >> Yes, with Pages.
    >>
    >> -Shawn
    >
  • On Sep 13, 2007, at 7:21 PM, John Stiles wrote:

    > *cue laugh track*
    > No, in all seriousness, I think he has a good point. We can load up
    > RTF files into our NSTextViews with only a few lines of code. I
    > don't think it's too much to ask that Pages documents be supported
    > with a similar API. (To the best of my knowledge, the answer is "no,
    > there is no API for this in Tiger.")

    There's a question here.  Do you want to render the entire Pages
    document, or just some preview of it?

    There's no API to render an ENTIRE pages document in Tiger, and I
    don't know that it would be a good idea to have a dedicated API to do
    it in any future version.

    The issue, in my opinion, is that PDF, RTF, HTML, (DOC being an
    exception, but also enjoying only limited support) are all standards
    based document formats.  Pages, in contrast, is a "proprietary"
    document format.  Pages has a complex layout process and that entire
    layout process would have to be incorporated into the renderer (you'd
    probably end up with something roughly on the size of Pages itself).
    Moreover, it would be harder for Apple to change the format of pages
    documents and still maintain backward compatibility in the renderer.
    To put it another way, standards based formats are easier to support
    because their specifications are slow and lumbering.

    Now, if you want a preview, you might be able to dig around in a Pages
    document and find some kind of document preview (probably a reduced
    quality PDF?) that you could display.  I imagine that's what Apple's
    QuickLook plugin will do.

    http://www.apple.com/macosx/leopard/features/quicklook.html

    :-)

    Scott
  • Thanks Scott. I built an app which searches a string within documents and
    display the result in a list, as well as Spotlight. In addition the user can
    click the items on the list and display the content (in the same window,
    with its own original layout...), he can copy text and images from there...
    So I would really like to display the original Pages format to the user and
    let him copy part of the contents. I already do that with DOC, PDF, RTF,
    RTFD, HTML, TXT, JPG, TIF... I miss Pages and of course other proprietary
    document formats as XPress, InDesign, Excel... But, I know, I can't get
    everything from life.

    I hope Apple could add this API to Cocoa (to read and display Pages, XPress,
    InDesign, Excel, the most popular formats) as well as it has done with
    WebKit and PDFKit and for DOC. This could be a good idea to display&copy any
    contents from an email attachment too. Also a great feature to add to the
    iPhone email app.

    Best Regards
    --
    Lorenzo
    email: <archidea...>

    > From: Scott Thompson <easco...>
    > Date: Fri, 14 Sep 2007 07:23:39 -0500
    > To: Cocoa List <cocoa-dev...>
    > Cc: Shawn Erickson <shawnce...>, Lorenzo <archidea...>, John
    > Stiles <jstiles...>
    > Subject: Re: Pages document
    >
    >
    > On Sep 13, 2007, at 7:21 PM, John Stiles wrote:
    >
    >> *cue laugh track*
    >> No, in all seriousness, I think he has a good point. We can load up
    >> RTF files into our NSTextViews with only a few lines of code. I
    >> don't think it's too much to ask that Pages documents be supported
    >> with a similar API. (To the best of my knowledge, the answer is "no,
    >> there is no API for this in Tiger.")
    >
    > There's a question here.  Do you want to render the entire Pages
    > document, or just some preview of it?
    >
    > There's no API to render an ENTIRE pages document in Tiger, and I
    > don't know that it would be a good idea to have a dedicated API to do
    > it in any future version.
    >
    > The issue, in my opinion, is that PDF, RTF, HTML, (DOC being an
    > exception, but also enjoying only limited support) are all standards
    > based document formats.  Pages, in contrast, is a "proprietary"
    > document format.  Pages has a complex layout process and that entire
    > layout process would have to be incorporated into the renderer (you'd
    > probably end up with something roughly on the size of Pages itself).
    > Moreover, it would be harder for Apple to change the format of pages
    > documents and still maintain backward compatibility in the renderer.
    > To put it another way, standards based formats are easier to support
    > because their specifications are slow and lumbering.
    >
    > Now, if you want a preview, you might be able to dig around in a Pages
    > document and find some kind of document preview (probably a reduced
    > quality PDF?) that you could display.  I imagine that's what Apple's
    > QuickLook plugin will do.
    >
    > http://www.apple.com/macosx/leopard/features/quicklook.html
    >
    > :-)
    >
    > Scott
    >
  • On 9/14/07, Lorenzo <archidea...> wrote:
    > Thanks John, probably Shawn didn't know that with a few Cocoa APIs we can
    > quite read and display RTF, RTFD, PDF, DOC, HTML files.

    Oh really? Who knew? =P

    -Shawn
  • On 9/14/07, Lorenzo <archidea...> wrote:
    I miss Pages and of course other proprietary
    > document formats as XPress, InDesign, Excel... But, I know, I can't get
    > everything from life.

    I assume you know about the following...

    <http://developer.apple.com/documentation/AppleApplications/Conceptual/iWork
    2-0_XML/Chapter02/chapter_2_section_4.html#//apple_ref/doc/uid/TP40002479-C
    H203-BCIEIHDD
    >

    > I hope Apple could add this API to Cocoa (to read and display Pages, XPress,
    > InDesign, Excel, the most popular formats) as well as it has done with
    > WebKit and PDFKit and for DOC.

    <http://developer.apple.com/bugreporter/>

    -Shawn
  • On Sep 14, 2007, at 9:28 AM, Lorenzo wrote:

    > Thanks Scott. I built an app which searches a string within
    > documents and
    > display the result in a list, as well as Spotlight. In addition the
    > user can
    > click the items on the list and display the content (in the same
    > window,
    > with its own original layout...), he can copy text and images from
    > there...
    > So I would really like to display the original Pages format to the
    > user and
    > let him copy part of the contents. I already do that with DOC, PDF,
    > RTF,
    > RTFD, HTML, TXT, JPG, TIF... I miss Pages and of course other
    > proprietary
    > document formats as XPress, InDesign, Excel... But, I know, I can't
    > get
    > everything from life.

    What we do know about Pages (and Keynote, and probably Numbers...
    though I haven't looked at it) is that it uses a document that
    contains zipped XML. (I see that Shawn has posted a link to the iWork
    document documentation at Apple).

    It doesn't seem to big of a stretch to think that you could crack the
    pages document open yourself and quickly find the text in the document
    using "just an XML Parser".

    I've got some code around here somewhere for exploring Keynote
    presentations that might get you 60% of the way there... where did I
    put that...  if I can find it... I'll send it off-list.

    Scott
  • On Sep 14, 2007, at 5:23 AM, Scott Thompson wrote:

    >
    > On Sep 13, 2007, at 7:21 PM, John Stiles wrote:
    >
    >> *cue laugh track*
    >> No, in all seriousness, I think he has a good point. We can load
    >> up RTF files into our NSTextViews with only a few lines of code. I
    >> don't think it's too much to ask that Pages documents be supported
    >> with a similar API. (To the best of my knowledge, the answer is
    >> "no, there is no API for this in Tiger.")
    >
    > There's a question here.  Do you want to render the entire Pages
    > document, or just some preview of it?
    >
    > There's no API to render an ENTIRE pages document in Tiger, and I
    > don't know that it would be a good idea to have a dedicated API to
    > do it in any future version.
    >
    > The issue, in my opinion, is that PDF, RTF, HTML, (DOC being an
    > exception, but also enjoying only limited support) are all
    > standards based document formats.  Pages, in contrast, is a
    > "proprietary" document format.  Pages has a complex layout process
    > and that entire layout process would have to be incorporated into
    > the renderer (you'd probably end up with something roughly on the
    > size of Pages itself).  Moreover, it would be harder for Apple to
    > change the format of pages documents and still maintain backward
    > compatibility in the renderer. To put it another way, standards
    > based formats are easier to support because their specifications
    > are slow and lumbering.

    You could say the same thing about HTML documents, but that doesn't
    stop NSTextViews from being able to display a mostly-usable version
    of the content.

    I think this argument doesn't hold much water. Sure, it's possible to
    create a Pages document that goes above and beyond what an NSTextView
    can do, but I think the same is true of all the formats that you
    listed above (of course excepting RTF). 99% of users will be making
    normal text documents that could easily be converted into RTF/
    NSTextView without any perceived loss of information. There's lots of
    justifiable reasons for adding support here.
  • On Sep 13, 2007, at 5:21 PM, John Stiles wrote:

    > No, in all seriousness, I think he has a good point. We can load up
    > RTF files into our NSTextViews with only a few lines of code. I
    > don't think it's too much to ask that Pages documents be supported
    > with a similar API. (To the best of my knowledge, the answer is
    > "no, there is no API for this in Tiger.")

    As you say, the answer is, there is no API for this at present.  As
    Shawn notes, the right thing to do if you want something in the kit
    is to file a bug report; or, if some of you really want this and have
    a bit of time to spare, you could get together and write an importer
    using the existing documentation for the Pages file format.

    Douglas Davidson
previous month september 2007 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today