Apache FOP || How does fo:flow knows that it has to print header in one column when there is less data - velocity

<fo:region-body region-name="page-region-body" column-count="2" column-gap="0.18in">
The header in fo:flow is printing two columns with same header when there is good amount of data, but only printing header in one column where there is less data, want to know the specific flow how it is working.
How it gets to know when and how to print?
header repeated twice
header repeated once

Related

Implementing List-Unsubscribe header(s) with swiftmailer (rfc2369, rfc6068, rfc8058, and friends)

Has anyone implemented the List-Unsubscribe & List-Unsubscribe-Post headers using swiftmailer ?
I know how to insert headers ...
$_headers = $message->getHeaders();
$_headers->addTextHeader( 'List-Unsubscribe', $list_unsubscribe );
if ( $has_dkim ) $_headers->addTextHeader( 'List-Unsubscribe-Post', 'List-Unsubscribe=One-Click' );
$list_unsubscribe variable may contain one <url> and/or one <mailto>
1st problem : Whatever the order of List-Unsubscribe and List-Unsubscribe-Post headers are set, they always appear in the wrong order (List-Unsubscribe-Post before List-Unsubscribe).
I tried to change header ordering using method defineOrdering, but that did not work as intended.
I even tried to hack the swiftmailer code to append those two new headers to the existing order list ... but did not work !
2nd problem : Would appreciate any hint on how to encode properly these two <url> & <mailto> using swiftmailer toolbox (i am also using the Decorator plugin).
Thank you for your answers.
So, 1st problem is solved !
According to RFC 5322
... header fields are not guaranteed to be in a particular order.

Different odd & even Header / Footer by Section in Word

I'm trying to figure out how to code headers and footers by sections and different even and odd pages, with a different cover. I'm looking to create something like this format:
Cover
No header or footer
Section 1
Odd Pages:
Header 1
Body
Footer 1 Date
File name, Page #
Even Pages:
Header 1
Body
Date Footer 1
File name, Page #
Section 2
Use the header and footer alternating pattern from Section 1 but with different Header text
Is this possible? Thanks in advance!

#Dblookup and formatting on web

I have been developing a web application using domino, therein I have dblookup-ing the field from notes client; Now, this is working fine but the format of value is missing while using on web.
For example in lotus notes client the field value format is as above
I am one, I am two, I am one , I am two, labbblallalalalalalalalalalalalalalalalalalaallllal
Labbbaalalalallalalalalalaalallaal
Hello there, labblalalallalalalllaalalalalalalalalalalalalalalalalalalalalalalala
Now when I retrieve the value of the field on web it seems it takes 2 immediate after 1. and so forth, I was expecting line feed here which is not happening.
The field above is multi valued field. Also on web I have used computed text which does db lookup from notes client.
Please help me what else could/alternate solution for this case.
Thanks
HD
Your multi-valued field has display options associated with it and the Notes client honors those. Obviously, your options are set up to display entries separated by newlines.
The computed text that you are using for the web does not have options like that and the field options are irrelevant because you aren't displaying the field. Your code has to insert the #Newlines. That's pretty easy because #DbLookup returns a list, and if you concatenate a list and a scalar, the scalar will be appended to each element of the list. (Look at the third example under "concatenation, pairwise" here to see what I mean.
The way you've worded your question is a little unclear to me, but what you need in your computed text formula is either something like this:
list := #DbLookup(etc,. etc.);
list + #Newline;
Or something like this:
multiValueFieldContainingListWithDbLookupResult + #NewLine;
I used #implode(Dblookupreturnedvalue;"");
thanks All :)

Content-Range configuration for Django Rest Pagination

6.30.15 - HOW CAN I MAKE THIS QUESTION BETTER AND MORE HELPFUL TO OTHERS? FEEDBACK WOULD BE HELPFUL. THANKS!
I need to send a content-range header to a dojo/dgrid request:
I cannot find any examples of HOW to do this. I'm not exactly sure where this setting goes (Content-Range: items 0-9/*). I have been given a great linkheaderpagination example on this question: Django Rest Framework Pagination Settings - Content-Range But I don't know how to make this work to produce a Content-Range response. Any takers or does anyone know of any good resources or examples??
UPDATE: I am trying to create pagination in Dojo/grid. I have am using a server-side api (Django Rest Framework) to supply to data to the Dojo/Dgrid. Django Rest Framework does not automatically sent content-range headers when it gets a response from Dojo. Dojo sends a range request when formatted to have pagination. I don't know now to configure the Django Rest Framework API to send a content-range header when it gets a request from Dojo. Unfortunately, I'm trying to do something very specific and just general settings on either side doesn't work.
Including Content-Range Header in response:
You just need to create a headers dictionary with Content-Range as the key and value as how many items are being returned and how many total items exist.
For example:
class ContentRangeHeaderPagination(pagination.PageNumberPagination):
"""
A custom Pagination class to include Content-Range header in the
response.
"""
def get_paginated_response(self, data):
"""
Override this method to include Content-Range header in the response.
For eg.:
Sample Content-Range header value received in the response for
items 11-20 out of total 50:
Content-Range: items 10-19/50
"""
total_items = self.page.paginator.count # total no of items in queryset
item_starting_index = self.page.start_index() - 1 # In a page, indexing starts from 1
item_ending_index = self.page.end_index() - 1
content_range = 'items {0}-{1}/{2}'.format(item_starting_index, item_ending_index, total_items)
headers = {'Content-Range': content_range}
return Response(data, headers=headers)
Suppose this is the header received:
Content-Range: items 0-9/50
This indicates that first 10 items are returned out of total 50.
Note: You can also use * instead of total_items if calculating total is expensive.
Content-Range: items 0-9/* # Use this if total is expensive to calculate
If you are talking about providing Content-Range in the response, I mentioned in an answer to another SO question (which I believe may also have originated from your team?) that there is one alternative to this header: if your response format is an object (not just an array of items), it can specify a total property indicating the total number of items instead.
Again looking for a few minutes at the DRF documentation, it appears it should be possible to customize the format of the response.
Based on the docs and reading the source of LimitOffsetPagination (which you want to be using to work with dstore, as already discussed in a previous question), if I had to take a wild guess, you should be able to do the following server-side:
class CustomPagination(pagination.LimitOffsetPagination):
def get_paginated_response(self, data):
return Response(OrderedDict([
('total', self.count),
('next', self.get_next_link()),
('previous', self.get_previous_link()),
('items', data)
]))
This purposely assigns the count to total and the data to items to align with the expectations of dstore/Request. (next and previous are entirely unnecessary as far as dstore is concerned, so you could take or leave them, depending if you have any use for them elsewhere.)

Crystal report page header not showing in every page

Good Day to All!
I am not much familiar with crystal report, but I've been digging every corner and can't really seem to find the solution.
My problem is that I cant get the Titles to show on everypage, it comes out only on the first page and thats it.
I have also tried placing the titles into different other sections like Section2(Page Header a,PageHeaderSection2) and even tried copy/paste them into all of the
sections to see the difference. It was no help.
I've searched for solutions like, RightClick>Report>Group Expert>Options>Check "Keep Group Together" check box.
Doesnt work, and I have nothing in my "Group By:" list so the "Options" button is disabled.
Here is what I have:
ReportHeaderSection1 (Report Header a)
ReportHeaderSection2 (Report Header b)
Section1(Report Header c)
Section2(Page Header a)
PageHeaderSection2 (Page Header b)
Section3 (Details)
Section4 (Rport Footer)
Section5 (Page Footer)
Under my ReportHeaderSection1 (Report Header a), I have inlcuded the titles and project names which is required to show on each of every printed page.
Under ReportHeaderSection2 (Report Header b), I have a graph.
Under Section1(Report Header c), I have cross tab.
The rest, is empty.
Your kind reply would be greatly appreciated.
Jim
The way to set this is in the Section Expert, not the group expert. There is a paging tab and an options tab where you can set your preferences. Check into that and let us know which version of CR you are running and I can tell you exactly how to do it in the morning.
Hope that helps,
Chris
EDIT:
After re-reading your post again, I think your report is not structured very well and is causing issues. In the Report Header you should only put stuff that you want to see once, like a company logo, a brief explanation of the report, etc. In the Page Header you should put things like column labels, current date, stuff that you want to see on every page. The Group Headers are for grouping data together under a common denominator (date, name, etc.). The Detail Section then shows the actual data for the group.