I am using PrimeFaces 4.0, I try to print a form that contains tables, I used PrimeFaces printer link here and it works well with the printer.
But the problem is that the table is not displayed on paper as it is displayed on the screen (the array size, the size of the writing etc ...)
I wanted to know how to manage the display on the printer or if there is a tool to integrate with eclipse that makes that easier!
You need to define your own css styles for print media or modify the existing ones so that themes are also available for print media.
For example add this to your css:
#media print {
.dataTableClassName {
width: 650 px;
text-align: right;
}
}
And here you can style your dataTable to make it look like you want it on paper. I don't know if there are any tools that can help you with that. Firefox has an option to display print styles, but i don't like it that much.
http://www.w3schools.com/css/css_mediatypes.asp
Related
We are working in iOS app and we are using "Adobe Arabic" and "Tahoma" font.
Both fonts in some area break. For example
Tahoma breaks by adding space between in a single word as shown in image below
Not sure why this is happening for some works. We have similar issue for Adobe Arabic for some Arabic text
Mostly font breaks when using verses from quran "بِسْمِ اللَّـهِ الرَّحْمَنِ الرَّحِيمِ" otherwise it is fine... That is when ever we add tajweed font break by adding space.
What could be the possible reason for this
As I see, its failing to render diacritics. Diacritics should be merged to their previous letters in Arabic. In your example, it breaks with the Shada diacritic ّ :
It happens mostly in Quranic verses because they are fully vocalized compared to normal texts.
A solution is to normalize your texts and strip diacritics. The list of diacritcs is:
// Diacritics
'0x64b' // FatHatan
'0x64c' // Dammatan
'0x64d' // Kasratan
'0x64e' // FatHa
'0x64f' // Damma
'0x650' // Kasra
'0x652' // Sukun
'0x651' // Shadda
The normalization is recommended for normal text but not Quran verses since its considered as a holy text and recommended to be written as fully vocalized Uthmani script. You may use pre-rendered images.
A deep solution is to use a rendering engine like harfbuzz. It renders Arabic perfectly.
Try this line in css:
.element {
letter-spacing: -1px;
}
It works with me.
Try these in your css
font-family: "Traditional Arabic", "Montserrat","sans-serif","Times New Roman";
If I add too many/too long captions to a vaadin7 timeline, they will only be displayed partially (i.e. the part we have space for is displayed and the remainder is truncated)
How can I increase this area in order to allocate enough space for all?
timeline.setGraphCaption(container, h.toString());
You need to add these rules in your scss file:
.v-timeline-widget .v-timeline-widget-modelegend{
background: inherit;
}
.v-timeline-widget-legend-label{
height: auto !important;
white-space: normal !important;
}
Before:
After
3 points:
While these rules may not met criteria of well-written CSS or good practice rules (I am looking at you !important), they do the trick. Still, better approach would be to get your hand dirty by editing Vaadin Timeline addon sources.
As you surely noticed text background has changed. That's because we override default background which was designed for only one line (you should provide your own background image)
Bottom of the widget is cut off by few pixels. Well, the only way to fix it is to jump into DOM and css and try fix it. Doable but I haven't tried.
I have a project that needs to produce reports in Delphi XE2 that have 4 elements per page. For instance, one page (11 x 8.5) landscape needs four quadrants
Rich text bulleted items in quadrant one
Bar chart in quadrant two and quadrant three
Pie chart in the final quadrant
Today, these reports are produced with a combination of Excel and Powerpoint which is very time consuming and I'd like to automate the process with a Delphi App.
I've had experience with Report Builder and Rave Reports, but I never ran into a situation where I needed to divide the page up into four areas. It was always the traditional single graph per page design.
Use Fastreport, it has Rich text and Chart objects and can make the layout that you want.
Just put one Rich text object and 3 chart objects on the page and fill them in the code.
You can use fastReport with subReports. Also you can activate the pages columns=2 and I think its possible to do it.
In FastReport you have all you say you need:
Pie Chart
Bar Codes
Ritch ext
And Group & master Detail Lists
One solution is to create you report and export it in pdf or jpeg, and then use another tool to produce the 4 quadrant.
Have a look to (free) PosteRazor application.
http://posterazor.sourceforge.net/
You can use the report generated by code, as available in our mORMot framework.
Each page is rendered in a TMetaFile content. In fact, you can use QuickReport or other report able to export the pages as meta files. The same occurs for charts: you save the chart as EMF content, then you draw it on the TGDIPages report.
Then it is easy to use a 2nd report instance to draw 4 pages per page.
Then you'll have preview, print or native pdf export at hand.
I'm trying to put together a LaTeX color box. The xcolor package \fcolorbox seem to be what I want, but I can't get the rendering quite correct. When I use
\fcolorbox{black}{red}{}
it renders a small box sunken to the bottom of the text line. The best I've managed to do is to fake it with a similar text color:
\fcolorbox{black}{red}{\textcolor{red}{--}}
However, I'm worried that this won't render correctly in all situations with defined colors. Is there a way I can declare an empty text box with full in-line text height? Is there another solution?
I'm basically looking for the code that produces the color boxes all through the document at ftp://ftp.dante.de/pub/tex/macros/latex/contrib/xcolor/xcolor.pdf. The boxes I'm referring to are used throughout, but the first instance is on page 4. Thanks.
The xcolor.dtx file in the same directory as the pdf contains the source for the package and the source for the documentation. The relevant bits from the source for the documentation:
\def\testclr#1#{\#testclr{#1}}
\def\#testclr#1#2{{\fboxsep\z#\fbox{\colorbox#1{#2}{\phantom{XX}}}}}
...
(Answer: 40\% \testclr{green} $+$ 60\% \testclr{yellow} $=$ \testclr{green!40!yellow}, e.g., |\color{green!40!yellow}|)
Basically, use \phantom{} on the contents of your color box, and make sure that at least one of the phantom characters is full-height.
Also, https://tex.stackexchange.com/
I can get sIFR to work but it will only display the bold version of the font I have exported. I checked the report and it seems to be stripping out any font weight that is not bolded in flash. I exported two different files to test, the first with regular and bold and the second with medium and semibold in both cases only the bolded weights were exported. Any ideas on how to fix this?
When exporting the Flash movie, make sure at least one character in the text field has the styles applied to it. Then it should export fine.
I had a similar problem - could not make the font 'bold' style work, and I even whanted my fonts BlackItalic to work. Messing around and reading your post and Marks answer made me try to apply the BlackItalic style to the very first word in the provided fla file. Keeping the css style 'font-weight: normal;' in the config java code was successful!
Until I read some new posts about this I will follow the work flow making individual swf files for every font style - normally I only want to use one or to styles anyway.