fo-block padding with negative value create issue - xslt

While using negative values for padding top in xsl fo-block, the block padding is adjusted but there is a space created on the bottom of the page. Even there is space in first page, some content goes to next page. Please help to resolve this issue

Related

What is the maximum amount of columns and/or rows in a css grid

When dynamically filling css grid columns I recently noticed that after column 1000 the remainder seems to be filled in the row direction. See the example below. This leads me to the question:
Is there a maximum amount of rows and/or columns when using CSS grid?
Suggestions of how to get the remainder (from 1001 on) in the next columns are welcome, but are not the core of this question.
The CSS grid seems to have a different column/row limit depending on the browser.
For chrome the limit seems to be 1,000x1,000 as explained here in the answer of Bludev
For firefox the limit seems to be 10,000x10,000, but I can't remember exactly where i read this.

Zurb Foundation: Block Grid refresh

Assuming I have 10 blocks in a Foundation "Block Grid" (where these blocks are equally spaced by the Block Grid) in 3 columns. That gives me 3 rows of 3 blocks and 1 row of a single block.
If I dynamically add a class with display:none to, let's say, first block what I would get is still the same 4 rows with a hole in place of block number 1.
Is there a way to force it to rearrange the blocks as if it had started with 9 originally where you would get 3 rows of 3 blocks?
EDIT:
A little later after my initial post it occurred to me to conduct a test and it looks like a bug in Block Grid: I included a display:none class to an LI within UL that is controlled by Block Grid in the HTML code from the beginning and sure enough the block that is not supposed to be displayed affects the layout!
It looks like Foundation counts the LI that are coded within the UL without considering their display properties. In the example above if I set the first block (LI) to display:none I still get 4 rows with first row having only 2 blocks showing!
After further search I found that Foundation applies clear:both to all n+1th elements in the Block Grid regardless of the element's visibility. However, if all the elements in the grid are of equal size clearing is not going to change anything.
In my case, luckily, all the elements are of the same size so by removing clear:both from the CSS (or overriding it with clear:none !important;) solves my case. However, this is not a solution if the elements are not of the same size. I also found this which is practically the same issue.

XSLFO no page-break on first page

I have an XSLFO document with a couple of block elements that have page-break-inside="avoid". Also there is a title-Element before each block-element with keep-with-next.within-page="always".
So basically I have paragraphs with a title and title and paragraph should always be on the same page and there shouldn't be a page-break inside the paragraphs.
The problem is that there are some blocks that have too much content for one page. If the content only overflows the region-body but not the entire page, no page-break occurs, so the block is still on one page.
However, there are blocks where the text overflows the entire page and in that case, there is a page-break-before. One such block element with too much content should be on the first page of the document. However, there is a page-break and it is on the second page of the document.
So in essence, my problem is that there should be no page-breaks within the block-elements (the pargraphs), title and paragraph should always be on the same page AND there should be no page-break before the very first block-element, even if it overflows the entire page. The content should always start on the first page and there should be no empty pages at all.
Thanks for your help and suggestions!
The spec says:
Keep conditions are imposed by the "within-page", "within-column", and "within-line" components of the "keep-with-previous", "keep-with-next", and "keep-together" properties. The refined value of each component specifies the strength of the keep condition imposed, with higher numbers being stronger than lower numbers and the value always being stronger than all numeric values.
Have you tried different values? Maybe you could change page-break-inside="avoid" into keep-together="<your value here>" to use tuned values.
Edit: See spec http://www.w3.org/TR/2006/REC-xsl11-20061205/#keepbreak

yahoo pipes trimming all item titles

After a lot of hard work, I have created two yahoo Pipes I will be using.
One of them has a minor problem however... I am trimming the title length down to leave enough room for a ... and a link to fit within a tweet.
It trims the first post correctly... however it trims all of the posts after that to 0 length (before adding a bit of extra text to the end).
The problem is I'm not using a loop for all items after a certain point, but the reason for that is the output is always items from a loop, and I need the output to be number at a certain point so that I can feed in that number asa variable to trim the length by. The pipe can be found here: http://pipes.yahoo.com/pipes/pipe.info?_id=3e6c3c6b2d23d8ce0cf66cb3efc5fb56
Typically, I am inserting any RSS feed in the top box, something like "new blog post:" in the middle and "#bussiness #hashtags" in the last box.
If you can see any way I can have this yahoo pipe work for all posts rather than just the top one, please let me know. its not a big deal as im only ever posting for the moment, the top post to twitter... however there may come a point where I need all of them looking the same.

How to iterate over all the page breaks in an Excel 2003 worksheet via COM

I've been trying to retrieve the locations of all the page breaks on a given Excel 2003 worksheet over COM. Here's an example of the kind of thing I'm trying to do:
Excel::HPageBreaksPtr pHPageBreaks = pSheet->GetHPageBreaks();
long count = pHPageBreaks->Count;
for (long i=0; i < count; ++i)
{
Excel::HPageBreakPtr pHPageBreak = pHPageBreaks->GetItem(i+1);
Excel::RangePtr pLocation = pHPageBreak->GetLocation();
printf("Page break at row %d\n", pLocation->Row);
pLocation.Release();
pHPageBreak.Release();
}
pHPageBreaks.Release();
I expect this to print out the row numbers of each of the horizontal page breaks in pSheet. The problem I'm having is that although count correctly indicates the number of page breaks in the worksheet, I can only ever seem to retrieve the first one. On the second run through the loop, calling pHPageBreaks->GetItem(i) throws an exception, with error number 0x8002000b, "invalid index".
Attempting to use pHPageBreaks->Get_NewEnum() to get an enumerator to iterate over the collection also fails with the same error, immediately on the call to Get_NewEnum().
I've looked around for a solution, and the closest thing I've found so far is http://support.microsoft.com/kb/210663/en-us. I have tried activating various cells beyond the page breaks, including the cells just beyond the range to be printed, as well as the lower-right cell (IV65536), but it didn't help.
If somebody can tell me how to get Excel to return the locations of all of the page breaks in a sheet, that would be awesome!
Thank you.
#Joel: Yes, I have tried displaying the user interface, and then setting ScreenUpdating to true - it produced the same results. Also, I have since tried combinations of setting pSheet->PrintArea to the entire worksheet and/or calling pSheet->ResetAllPageBreaks() before my call to get the HPageBreaks collection, which didn't help either.
#Joel: I've used pSheet->UsedRange to determine the row to scroll past, and Excel does scroll past all the horizontal breaks, but I'm still having the same issue when I try to access the second one. Unfortunately, switching to Excel 2007 did not help either.
Experimenting with Excel 2007 from Visual Basic, I discovered that the page break isn't known unless it has been displayed on the screen at least once.
The best workaround I could find was to page down, from the top of the sheet to the last row containing data. Then you can enumerate all the page breaks.
Here's the VBA code... let me know if you have any problem converting this to COM:
Range("A1").Select
numRows = Range("A1").End(xlDown).Row
While ActiveWindow.ScrollRow < numRows
ActiveWindow.LargeScroll Down:=1
Wend
For Each x In ActiveSheet.HPageBreaks
Debug.Print x.Location.Row
Next
This code made one simplifying assumption:
I used the .End(xlDown) method to figure out how far the data goes... this assumes that you have continuous data from A1 down to the bottom of the sheet. If you don't, you need to use some other method to figure out how far to keep scrolling.
Did you set ScreenUpdating to True, as mentioned in the KB article?
You may want to actually toggle it to True to force a screen repaint. It sounds like the calculation of page breaks is a side-effect of actually rendering the page, rather than something Excel does on demand, so you have to trigger a page rendering on the screen.