abcpdf page-break-before not working on last items in the list - abcpdf

Documentation from abcpdf, http://www.websupergoo.com/helppdf9net/source/3-concepts/g-htmlrender.htm, says that the html element below will cause a page break. It does but for the last page as you can see in the screen shot it doesnt. HTML passes validation, and the breaks are there so is this a bug?
<div style="page-break-before: always"> </div>

This seems to be by design, so no fix for it.

Related

Make entire div clickable

I am trying to get the whole div clickable and this works but only with a straight link to another site. Is there a way to make it work with this text in it also:
<div class='reddit' title='Share Us On Reddit' onclick="window.open('http://www.reddit.com/submit?url=httpsFwww.example.com&title=XXX is Cape Breton's Homepage. Start Your Web Search With Beautiful Cape Breton Island')">
Thanks
From CSS Tricks
This probably isn't a thing you need to rely on JavaScript for
anymore. Since HTML5, this is perfectly valid:
<a href="http://example.com">
<div>
anything
</div>
</a>
And remember you can make links display: block; so sometimes you
don't even need the div.
<div style="cursor:pointer" onclick="document.location='evenidontknow-page.html'">
<h2>Full Div Clickable</h2>
</div
The above code helped me very well, and this will not require any extra code.
Using a tag may solve the problem but we need to add extra code to it.
please check this link for more info w3schools
Bootstrap has a feature called "Stretched Link". From the documentation:
Make any HTML element or Bootstrap component clickable by “stretching” a nested link via CSS.
You can read more by visiting the following link:
https://getbootstrap.com/docs/4.4/utilities/stretched-link/

MVC 3 HTML 5 and HTML 4

I have a MVC 3 project and I enable the HTML 5 markup. For the HTML 5 part, it is running fine.
Now I created a partial view and copy and paste some code into it
The first line is
<div id="Header">
I want to use this partial view in my view which is html 4 markup.
The problem comes, the razor engine automatically convert my
<div id="Header">
into
<Header>
I don't want to use HTML 5 for this view but only HTML 4. What should I do?
If you change the div as follows, it won't get swapped out:
<div id="strap">
Which may solve your immediate problem.
why do you want to covert back to:
<div id="Header">
where is the way to go in the future?
If you worried about the compatibility with the older browser, you can simply implement modernizr-2.6.2.js. (which should come with the Visual Studio web projects)
This will make all the basic HTML5 works in older browser.
(tho haven't tested with browser older than IE6)
you could always use a class instead of an id
<div class="header">
this has the added advantage of not making your css (if any) for this element very specific, and also means that the ID cannot be reused.
you can still select your element using jQuery selector using it's class as the selector
$('.header')
question for you: Did you created the Html 4 partial view in Html 5 view? ; If your answer is yes, the problem you mentioned is occurring naturally. When MVC renders your page, he first renders the Html 5 part(the layout master page). As a result, Html5 type doc type will be chosen by default. After that when the Html 4 partial view is rendered, the engine renders it under a mark up support for Html 5.
if i want to summarize what i wanted to say:
<html>
//Html 4 partial view.
</html>
This will make a Html 5 markup view no matter what Html4 code you wrote in that partial view. If i am wrong, let me know. I will learn from my mistakes. thanks.
Can you please use Transitional doctype on the top of your partial view page. Because HTML engine understand the page according to doctype.

Telerik:RadRotator Not displaying(rendering) in IE9

Ok i have a telerik:RadRotator on my page that loads a few images from the db, the rotator displays correctly in both FireFox and Chrome but when i open it in IE9 the rotator div is placed on the page but the rotator itself doesn't display(render).
<telerik:RadRotator ID="RadRotator1" runat="server" Width="791px" Height="215px"
ItemHeight="215px" ItemWidth="791px" OnItemDataBound="RadRotator1_ItemDataBound"
RotatorType="AutomaticAdvance" FrameDuration="10000" ScrollDuration="3000" CssClass="ImageRotator"
ScrollDirection="Right" PauseOnMouseOver="false">
<ItemTemplate>
<asp:HyperLink ID="hypImage" runat="server">
<asp:Image ID="imgScroller" runat="server" Width="791" Height="215" /></asp:HyperLink>
</ItemTemplate>
Any ideas as to what is happening here? I have tried to remove the styles applied and nothing.
Such problems are often related to an incorrectly formatted HTML that is not ignored by IE, especially older versions of the browser. The only issue that I found in your code was the unclosed RadRotator control tag, although most probably you have missed it by accident. Since the code from your sample appears to be valid, it is possible that an erroneous content is inserted from the data source. Please verify that the content in the datasource is entered correctly and that the data, populating the items of the rotator, is properly escaped before it is used. You can also check if the RadRotator's items are rendered properly by examining the content of the li elements in the HTML representation of the control on the source of your page.
Ok after much fuss I found that the scroller itself was wrapped in a hyperlink. After removing the hyperlink everything works 100%

IE8 shows empty line after floating elements in contenteditable

If you have an element following another element that has float:left and turn on contenteditable in IE8, the following element will be precedet by an empty line in IE8 if you turn contentEditable="true".
An example:
<img src="foo.jpg" style="float:left">
<p>Some random text</p>
in IE8 this will be rendered like this:
See the line before "Some random text"?
This is especially annoying if you use a wysiwyg-editor because this affects some of its functionality. Also, this creates markup you don#t want. In CKEditor, you can see that the dom-path of that line is in the body, not inside any element.
I reported that problem to Microsoft some time ago and they didn't want to fix it: https://connect.microsoft.com/IE/feedback/details/576042/floated-elements-in-contenteditable-can-generate-an-empty-line
The last time that I checked with IE10 pp2 still had the problem.
Manually setting the css of paragraph elements with:
p {margin-top:0;margin-bottom:0}
should resolve this issue.

Link to anchor tag on a different page not working in Firefox

I have a link at the bottom of a page, and its purpose is to link to an anchor on a different page. It doesn't seem to work in Firefox (at least, not in v8). Instead, on load it goes right to the very bottom of the page.
Any help is appreciated!
Source: http://msi.emsix.com/news/1900/1/Six-in-Ten-Employers-Hope-Health-Care-Reform-will-be-Repealed.aspx (the "Susan McIntyre" link at the bottom)
Anchor markup:
<h3 id="mcintyre" name="mcintyre">Susan McIntyre</h3>
Try adding the following code:
<a name="mcintyre"></a>
<h3 id="mcintyre">Susan McIntyre</h3>
This works correctly if I disable javascript.
It looks like what happens is that the scroll is done before you use script to collapse away a bunch of the content. So the final scroll position ends up wrong.
If you're collapsing the content away async, that could do it...
If you are unable to create <a name='%hashName%'></a> anchor, consider this:
$(document).ready(function(){
$(window.location.hash).append('<a name="' + window.location.hash.replace('#','')+ '"></a>');
window.location.href=window.location.href;
});
I know it looks weird, but works fine.
Since today I haven't heard about div anchor tags. Are you sure it is proper to expect such kind of behaviour from browsers?

Resources