Are you getting text cut off on creating a PDF, direct print, AWT renderer, or all of the above? I must've been seeing something get cut off. I have hardcoded margin-bottom=".2px", margin-right=".25px" in my XSL sheet. Cutting something off could be any number of bugs. Did your text run out of the area defined in the XSL, or did FOP or the renderer or the output target add it's own margining and cut it out? Are you seeing out of area messages in Java console? When you say about placing something on the left or right facing page, are you just printing text as one big blob and it spills over to the next page? In mine I'm actually doing reporting, not just printing a book, so I have specific text to print in columns at specific areas on the page, so I generate XML that creates tags to specify each page and each line of text. When you're telling it where to print everything specifically, you can already know whether you're on a left or right page and just code in the image to print on that page. Though I'm not printing anything in book format so I don't have a left and right, I can tell it specifically 'print this on page x'. I also coded in absolute positioning so I can print anything anywhere, to print text at the bottom of the page then go back and print the top or middle.. One cool part about generating an entire report in XML then passing it all in at once to be printed/transformed using FOP, I can add a page number to a tag, to print 50 pages then go back and print something on page 1.
________________________________ From: David Gerdt [mailto:[email protected]] Sent: Thursday, March 25, 2010 1:19 PM To: [email protected] Subject: RE: page master with no flow text in region-body Found a solution but also maybe a bug. I actually ran across a solution on the mailing list that I hadn't found earlier [1]. I have attached an FO file that demonstrates a working solution, but I am not entirely sure about why it works and believe there might be a bug. I've come to realize that I do not fully understand the relationship between extent and margins for the different page regions, however so I'm not confident. The interesting (and potentially buggy) bit from the attached file is that the odd pages (see the "front" simple-page-master) MUST have a non-zero top or bottom margin. If they have a zero top and bottom margin, a line is lost--line numbers will go from 50 to 52 instead of from 49 to 50. It seems strange to me that I would lose a whole line of text just because I changed my margin by 0.001in. I would appreciate if someone with some real knowledge could let me know if this is in fact a bug. I wouldn't even know how to properly describe it. I'd be happy to file a Bugzilla request, but I don't want to waste the devs' time. If I don't hear anything within a week or so, I'll probably just file one or shoot a note to the dev list for future reference and they can invalidate it at their leisure. Thanks for the suggestions, Mario. [1] http://markmail.org/message/ahozinncqu5wtquf >>> "Mario Madunic" <[email protected]> 3/24/2010 10:44 AM >>> David, Someone had suggested to place the image in the page header and this would force the image on the left facing page. Could something like this work for you? Make the header on the even page contain your terms and conditions also and force a page break? Marijan (Mario) Madunic Publishing Specialist New Flyer Industries From: David Gerdt [mailto:[email protected]] Sent: Wednesday, March 24, 2010 9:34 AM To: [email protected] Subject: RE: page master with no flow text in region-body I had considered this, but unfortunately I don't think this approach is possible in my case. I can't guarantee how much space a particular item will take because some of them include notes, and other information. >>> "Mario Madunic" <[email protected]> 3/24/2010 10:21 AM >>> Don't know if the following will help but here it is. I have a similar situation where left always was an image and right was its parts listing. The parts listing could go two pages but it needed to always be on the right. What I did was figure out how many parts fit on one page and then create temp vars of the parts and then in a choose statement decide the sequence of tables. Like thus Choose When count of parts is less than 54 Table image Table parts When count of parts is greater than 53 Table image Table parts (first 53) Table image Table parts (all after 53) And each table has page-break-after="always" This will only work if you know how many lines you require and if your content is more tabular in nature. Marijan (Mario) Madunic Publishing Specialist New Flyer Industries From: David Gerdt [mailto:[email protected]] Sent: Wednesday, March 24, 2010 8:54 AM To: [email protected] Subject: Re: page master with no flow text in region-body I must have missed the last message in this thread. I've come back to this issue after a long break. To review, my use case is that I want to have a static body of text printed on every even page. It will be a set of Terms and Conditions that is to appear on the back of each packing slip when they are duplex printed. So I'm trying to prevent any flow text from appearing on even pages but cannot find a way. Vincent's last response seems to indicate that it is possible to prevent flow text from appearing on a page using margins. That's been my approach so far, but I've been unsuccessful. You will notice from the attached PDF that one line is written to page 2 even though the margins should not allow this. I've tried several different combinations but have always had at least one line written to that page. I've attached all the relevant files. Thanks for any input! Dave >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Hi David, Can you please send your FO file (directly to me if it's big or confidential)? I tried on a simple file and by setting margins on the region-body to make it empty I could get the content to be typeset only on odd pages. Thanks, Vincent David Gerdt wrote: You remembered correctly. java.lang.IllegalStateException: Flow 'xsl-region-body' does not map to the region-body in page-master 'front'. FOP presently does not support this. Thanks for the help anyway. "Amick, Eric" <[email protected]> 11/16/2009 3:18 PM >>> In standard FO, you should be able to just give the region-body a different region-name and have static-content write to the region-body. FOP might not like that, unfortunately, if I remember correctly. Eric Amick Systems Engineer II Legislative Computer Systems From:David Gerdt [mailto:[email protected]] Sent: Monday, November 16, 2009 15:11 To: [email protected] Subject: page master with no flow text in region-body Is it possible to create a page-master where the region-body will not allow any of the flow text to come in? I want to create a document that will be duplex printed where the front of the page (odd pages) will be dynamic and the back of the page (even pages) will be a static body of text, the same on every even page. My thought was to use conditional-page-masters for odd and even pages where the margins of the even page would not allow any text to be written in the region-body and use the region-before to include my static text. For instance, I supposed that if the region-body area were only 1mm, no dynamic text would fit and only the static content would be displayed. This apparently doesn't work. The region-body seems to always contain at least one line of text. I know I could probably use the IF to do this, but does anyone know of a way to do this in straight XSL-FO? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] -------------------------------------------------------------------- Please consider the environment before printing this e-mail. CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] -------------------------------------------------------------------- Please consider the environment before printing this e-mail. CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
