General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion How to tell the number of pages in XMetal?

  • linjinwei

    How to tell the number of pages in XMetal?

    Participants 8
    Replies 9
    Last Activity 13 years, 8 months ago

    Hi guys.

    Is it possible to tell how many pages you have created within XMetal?

    What I am trying to say is, when you are using Word Document, the program lets you know how many pages you already have. Can this also be achieved in XMetal?

    Reply

    dcramer

    Reply to: How to tell the number of pages in XMetal?

    The short answer is no.

    Reply

    linjinwei

    Reply to: How to tell the number of pages in XMetal?

    ok, as i expected.

    Case closed

    Reply

    ghkrause

    Reply to: How to tell the number of pages in XMetal?

    How do you define pages?
    In DITA you can say each topic is a page (in HTML for sure, in PDF the ratio depends on your guidelines). For PDF you just run a rendition and then check the number of pages – which you see in Acrobat but not inside XMetaL …

    Reply

    linjinwei

    Reply to: How to tell the number of pages in XMetal?

    Well thats what I mean. You can only tell the number of pages AFTER you output in PDF.

    Reply

    Derek Read

    Reply to: How to tell the number of pages in XMetal?

    Correct. I don't believe there are any tools that will give you this answer directly. If such a tool exists and it uses the DITA OT in any fashion it will need to generate output somewhere (perhaps without showing you the output) and then providing you with the final number (which is basically the same thing).

    The questions I would like to know the answer to are:
    1) Why?
    2) If there are too many or two few pages in your output what would you want to be able to do to “fix” that?

    (Given your other postings in addition to this one…) It seems there is something missing between your understanding of the primary benefits of the usage of XML that I cannot quite grasp.

    I would be interested to know if other readers of this post feel the need to know how many pages will be produced in any particular print-based output before producing that output. So far this seems to be a unique request and I just can't think of a real need for it.

    Reply

    linjinwei

    Reply to: How to tell the number of pages in XMetal?

    Alright since you want to know why, take a look at the attachment that I have.

    The PDF file is the document which I am trying to create using XMetal.

    Reply

    mag3737

    Reply to: How to tell the number of pages in XMetal?

    The PDF is interesting, but it does not answer the question of why you need to know the number of pages are in the document while you are writing the content.  In fact, compared to many other documents I have seen, it looks even less likely that you would need to know this information, as I do not see any references to physical page numbers anywhere in the document.  Most of the numbering appears to refer to section numbers that have nothing to do with the page number.

    It is a fundamental characteristic of XML that there is no concept of page numbers in the XML source code.  Pagination is formatting, and by definition does not exist until output has been generated.

    Reply

    Bill H

    Reply to: How to tell the number of pages in XMetal?

    It seems like if you have a need to know, then you have to produce the output. One good thing in this regard is that the output is created very quickly.

    Reply

    dcramer

    Reply to: How to tell the number of pages in XMetal?

    If you're willing to process your XML source to get the number of pages and for some reason generating a pdf and inspecting the pdf is not good enough, I can imagine a macro that 1) processes the document using the DITA OT to produce a .fo version of the file, 2) Processes that .fo file using a renderer that is able to produce an XML representation of the pdf (this format is specific to the fo renderer, I know that XEP has one and believe that other renderers do to) and is unlike the fo in that it contains pagination information. 3) Parse that XML file and report back the total number of pages.

    That's a way where you could do the whole thing programmatically. The only other way that I can think of would be to generate a pdf and then use something like iText http://www.lowagie.com/iText/ to look at the pdf and report back the number of pages (I'm assuming iText can do that…I haven't actually used it).

    I'd have to wonder if it would be worth the trouble, but you can let your client decide that.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support