Quantcast
Channel: HtmlRenderer Discussions Rss Feed
Viewing all 63 articles
Browse latest View live

New Post: HtmlToolTip Scrollbars

$
0
0
Is is possible to have the HtmlToolTip display scrollbars for long content?
Possibly have it respond to the mousewheel to scroll up and down?

New Post: HtmlPanel - Making OnScreen Keyboard popup on touching the panel

$
0
0
It seems like the HtmlPanel is using some Input control which makes the Onscreen keyboard to open whenever the panel get touched in tablet devices.

I tried to disable the panel by setting property 'IsEnabled' as 'false'. However, still I'm facing the same issue.

Also, I tried with HtmlLabel, it seems it doesn't support scrolling.

Is there a way to override the control of HtmlPanel. . ?

Thanks in Advance.

New Post: Title attribute support?

$
0
0
Hallo,

is there a support of the Title attribute? In the most Browsers the text of the title Attribute will be shown as a ToolTip, but this seems not to be shown.

Is there an other way to show a tooltip based on the element under the mouse cursor?

Thanks
Robert

New Post: Title attribute support?

$
0
0
I have a similar question, so I'll post it here: is there any support for alt or title text on images?

(This came up in a discussion relating to accessibility requirements, so I'm not sure how much of that HTML Renderer already supports.)

New Post: video in HtmlPanel

$
0
0
Hello,
Does HtmlPanel support <video> tag from HTML5 ?
If not, will be a version that can support it ?
Thank you.

New Post: How to add page break throwgh HTML code

$
0
0
Hi to all! Is it possible to add manually page break throwgh HTML code in order to produce a PDF file with page change where i want to?

New Post: How to use custom fonts with HtmlRenderer?

$
0
0
Hi all,

I'm trying to use HtmlRenderer with an HTML that uses customized font, but with no success at all when hosted on the IIS7 server.

I have several scenarios I would like to share with you guys:

1- The one that works when running from my own computer, from Visual Studio (using some kind of IIS Express host process):
I simply installed the font in computer, then I added the FontFamily to the HtmlRenderer by using AddFontFamily(new FontFamily("MyFont")) . In the html , I defined the font-family property for the class in the style section., and then everything works perfectly fine when I execute locally HtmlRenderer.RenderToImageGdiPlus

However, HtmlRenderer throws an exception when I do the same thing on the server (error related to INVALID PARAMETER). If I remove HtmlRenderer.AddFontFamily , it stops throwing the exception, but I dont get to use the font anymore.

2- Trying to embed the FONT in the html (base64)
Embeding Base64 images in the HTML worked for me, but not for base 64 TTF font. The HTML page is fine and loads the embeded when I rendered in the web browser , but this feature does not seems to be supported by HtmlRenderer. For more info on how to do this, you can check http://blog.patdavid.net/2012/08/embedding-fonts-with-css-and-base64.html

3- Trying to load from font from a local path or web address
None of those worked:
@font-family { font-family: MyFont;
src: url('file:///C:/fonts/myfont.ttf') format('truetype');
or
src: url('http://localhost/Content/fonts/myfont.ttf') format('truetype');
or
src: url('http://172.25.4.16/Content/fonts/myfont.ttf') format('truetype');


Do you guys know what I could do to make this work?


Thanks and regards
Walter

New Post: 2 columns

$
0
0
What is the trick to set table cell width?

New Post: How to render checkbox in the pdf

$
0
0
I am using HtmlRenderer.PdfSharp to create a pdf file from html string.

I have tried this and is not rendering the checkbox in the pdf.

<input type='checkbox'>Some Text

Has anyone got this working? Thanks in advance.

New Post: CSS Property 'font-size' Ignored

$
0
0
I'm not sure if this is a bug or if I'm just doing something incorrectly, but it appears that the font-size property within my css is being ignored. My project allows a user to enter text in markdown format, which I translate into HTML, and then a user can print a PDF version. Since there are a lot of sections I'm using the HtmlRenderer.RenderToImage() and inserting the images into the PDF.

The HTML has no inline styles because it's converted from markdown, and really only paragraphs, and lists are being used. Therefore I have a a style string (see below) that gets parsed with HtmlRenderer.ParseStyleSheet() to create a CssData object to pass into the RenderToImage function.

"p, li { font-size = xx-small; font-family: \"Trebuchet MS\",Helvetica, sans-serif; line-height: 1; margin: 0px; }"

I noticed that no matter what I set for the font-size property the text was always the same size when rendered into the image, so I set a breakpoint to see what is the CssData object. All of the properties except for the font-size property was added to the correct elements.

What do I need to do to make sure that the font-size is honored?

New Post: Event for hover over links

$
0
0
Hi,

I would like to show the link destination in a statusbar like some browsers do.
Is there an event when the mouse hovers over a link?

Regards,
Scott

New Post: Scrolling to end

$
0
0
I'm having trouble implementing https://htmlrenderer.codeplex.com/discussions/442448. There is no property called AutoScrollPosition, or AutoScrolling as described in the demo.

How do I scroll an HtmlPanel to end?

I'm using it to render html content from an Xmpp server and every time I update the Text property, the panel scrolls to the top.

Also open to a better method of appending content to the HtmlPanel.

New Post: Debugging Generated PDFs

$
0
0
How should one go about debugging PDF errors?

When I open the PDF I get "an error exists on this page, Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem"

I know what part of HTML is causing the issue (by removing chunks until it rendered), but I don't know WHY. The HTML is totally valid.
<table width="100%">
        <tr>
            <td>  
                BUYER: <br />
                Buyers Name Here<br />
                Buyers Address Here<br />
                City, State ZIP
            </td>
            <td>
                SELLER:<br />
                Sellers Name Here<br />
                Sellers Address Here<br />
                City<span>, </span>State<span>&nbsp;</span>ZIP<br /><br />
            </td>
        </tr> 
    </table>
When I remove this table from the rest of the document, the PDF renders fine.

How do I debug these errors?

Edit:
Through some more random thrashing around, I found the issue is caused by having a table cell that goes to more than one line. So, if I remove the <br /> tags, it works fine... I can replicate it using <p> and <div> tags within the cells as well. Still need to know if there is a good way to debug this sort of stuff

New Post: Stop page breaks for certain tags

$
0
0
Hi, is there any way to ensure a page break doesnt happen for html content within certain tags, when using PdfGenerator.GeneratePdf? For example:
<div>
<p>Text</p> <p>Text 2</p> <div>

I'd like to ensure that everything within div appears on the same page (unless it exceeds the length of a page).
Thanks

New Post: disabling text cursor on HtmlPanel

$
0
0
This seems like a stupid question, but:

When I downloaded the demo found on CodeProject, the HTMLPanel was ReadOnly and selecting the text was not an option. On the demo from CodePlex the cursor changed to Text and selecting the text was an option.

My users will be dragging and dropping and double-clicking on my panels, but I don't want them to think they can change the text. Any way to make the text non-selectable and keep the cursor default? I'd rather not downgrade because I'm using Framework 4.0.

Thanks in advance.

New Post: disabling text cursor on HtmlPanel

$
0
0
Found it. It's the IsSelectionEnabled property.

New Post: How to add page break throwgh HTML code

$
0
0
I would also like to achieve this. Did you find a solution?

-S

New Post: How to add page break throwgh HTML code

$
0
0
I had same problem. Never found a solution.

New Post: colspan cause RenderToImage() method generate the empty image result

$
0
0
colspan cause RenderToImage() method generate the empty image result
(table with one tr(colspan=5), normal image result after rename or remove colspan :

html
<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: none;"><tbody><tr><td colspan="5" valign="top" style="width: 424.05pt; border: 1pt solid windowtext; padding: 0cm 5.4pt;"><p class="MsoBodyText" style="margin-bottom:0cm;margin-bottom: .0001pt;text-align:center;"><strong><span style="font-size: 14pt;">Some System<span lang="EN-US">-</span>Changes<span lang="EN-US"></span></span></strong></p><p class="MsoBodyText" style="margin-bottom:0cm;margin-bottom: .0001pt;text-align:center;"><strong>CIS<span lang="EN-US">_</span>Manual</strong><strong><span lang="EN-US" style="font-size: 14pt;"></span></strong></p><p class="MsoBodyText" style="margin-bottom:0cm;margin-bottom: .0001pt;text-align:center;"><strong><span style="font-size: 14pt;">Changes<span lang="EN-US"></span></span></strong></p></td></tr></table> C#
System.Drawing.Image image = TheArtOfDev.HtmlRenderer.WinForms.HtmlRender.RenderToImage(
  html,
  new System.Drawing.Size(600, 600),
  System.Drawing.Color.White);

image.Save(@"C:\Temp\_image_" + DateTime.Now.ToString("yyyyMMdd-hhmmss") + ".png", System.Drawing.Imaging.ImageFormat.Png);
-- end --

New Post: colspan cause RenderToImage() method generate the empty image result

$
0
0
html original from Word document (html format).
Viewing all 63 articles
Browse latest View live




<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>