General XMetaL Discussion
linjinwei January 14, 2009 at 1:25 am
How to tell the number of pages in XMetal?January 14, 2009 at 1:25 amParticipants 8Replies 9Last Activity 13 years, 8 months ago
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?dcramer January 14, 2009 at 3:44 am
Reply to: How to tell the number of pages in XMetal?January 14, 2009 at 3:44 am
The short answer is no.linjinwei January 14, 2009 at 9:59 am
Reply to: How to tell the number of pages in XMetal?January 14, 2009 at 9:59 am
ok, as i expected.
Case closedghkrause January 14, 2009 at 11:01 am
Reply to: How to tell the number of pages in XMetal?January 14, 2009 at 11:01 am
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 …linjinwei January 15, 2009 at 1:04 am
Reply to: How to tell the number of pages in XMetal?January 15, 2009 at 1:04 am
Well thats what I mean. You can only tell the number of pages AFTER you output in PDF.Derek Read January 15, 2009 at 2:17 am
Reply to: How to tell the number of pages in XMetal?January 15, 2009 at 2:17 am
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:
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.linjinwei January 16, 2009 at 5:16 am
Reply to: How to tell the number of pages in XMetal?January 16, 2009 at 5:16 am
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.mag3737 January 16, 2009 at 5:54 pm
Reply to: How to tell the number of pages in XMetal?January 16, 2009 at 5:54 pm
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.Bill H April 14, 2009 at 7:00 pm
Reply to: How to tell the number of pages in XMetal?April 14, 2009 at 7:00 pm
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.dcramer April 14, 2009 at 8:42 pm
Reply to: How to tell the number of pages in XMetal?April 14, 2009 at 8:42 pm
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.
- You must be logged in to reply to this topic.