Alignment Issue in telerik editor - c#

I am using telerik editor(in asp.net), I am trying to write some content in that, some words or content are place on right hand side using tab key (i.e 4 time ).
At design time it display properly but when I print that document the right hand side words goes to the next line or some time it comes in middle of the page.
how I can solve this alignment problem??
1.before print(i.e design time in editor)
1.after print(i.e A4 page image after print)
thank you.

You have two options as I see it:
Define your own Print.css file and follow the instructions on this Telerik documentation page to ensure the print CSS is used. This will ensure printing is consistent and any stripping of CSS done by the browser is avoided.
Generate a PDF from the Telerik editor, and print the PDF. See this Telerik documentation page with demo code for more details on how to generate a PDF from the Telerik ASP.net RadEditor control.

Related

Adding a watermark to title page with openxml

I am using C# and the Open XML SDK to create a watermark in a Word document. This works fine apart from one thing - the first page doesn't show the watermark.
I believe this is due to the Header and Footer setting "Different First Page" being ticked in the document.
In terms of what I have tried - I have used the add watermark code and applied it to the relevant header.xml file that is produced as part of the documents contents but it had the effect of showing an additional watermark on the subsequent pages rather than first.
I am struggling to find anything online to help with this. Can anybody please shed light?
This was caused by me not creating the 3 necessary header files for each enum type. It needs HeaderPart and HeaderReference set. Section Properties should be updated for thi.
Microsoft documentation of Header enum

Aspose.Slides for .NET API

Can anyone explain the difference between
SetExternalHyperlinkMouseOver and
SetExternalHyperlinkClick?
I am trying to add a tool tip text along with redirection hyperlink in an Aspose slide text using C#. But I'm unable to understand what the difference between SetExternalHyperlinkMouseOver and SetExternalHyperlinkClick is.
SetExternalHyperlinkMouseOver sets the mouse over text shown by the PDF.
SetExternalHyperlinkClick however sets what url will be followed when the hyperlink is clicked.
Does that clear things up?

PDF First page image preview in DIV on website

In my system, there are multiple PDFs listed in the website. I need to show the preview image of 1st page of all the PDFs.
There are two previews which I want to display -
One small preview
One big preview on mouse hover
What I am doing now?
We are taking help few third party preview generators. Which is used to create JPEG image and using those images in the website for previews.
What I tried differently?
I used EvoPDFtoHTML tool to use HTML instead of images directly but for many files the generated HTML is not appropriate.
Also, These both process is taking a lot of time and making website
slow in response.
I would like to know that is there any better way to achieve this?
Image attached below for better understandings -
An approach that is worth exploring
Parse the PDF and extract the 1st page.You may use command line tools like : PDFtk, Ghostscript, or Implement your own class to parse out the first page in C#
Then use Google doc viewer and embed an iframe to point to PDF
Example of PDFtk:
pdftk input.pdf cat 1 output page-1-of-input.pdf
Example of GhostScript:
gs -o page-1-of-input.pdf -sDEVICE=pdfwrite -dPDFLastPage=1 input.pdf
References:
Display first page of PDF as Image
You can also look at Fahims answer for the C# snippet that he tried

ABCPDF Arabic Text Rendering Incorrectly

When I am rendering Arabic text on a report, the text is not rendering correctly. The text appears to be being rendered one individual letter at a time, rather than being joined up.
The text is being displayed right to left correctly (I've used the dir=rtl formatting on each element I'm adding), which is confusing me.
Any help anyone can give is appreciated.
I've added a screenshot of some text as an example.
So I emailed abcpdf directly and they told me this:
ABCpdf 8 supports Arabic, but does not support contextual ligatures with the Doc.AddHtml approach - only with regular HTML/CSS (i.e. using Doc.AddImageUrl or Doc.AddImageHtml).
Support for contextual ligatures with Doc.AddHtml was added in ABCpdf 9.1 and is present in the current live release, ABCpdf 10.
Further clarification:
if I add an html file with the specific Arabic text onto my server, i should be able to access it and render the text in that file correctly?
That's correct. Please ensure you have the final ABCpdf 8 minor version (8123) from our Downloads page. And you may need to use the Gecko HTML engine - please see the HtmlOptions.Engine property.

How Can I add border on every page of PDF file using Wkhtmltopdf?

I am trying to convert html to pdf using wkhtmltopdf and I have done with it.But I din found any property to add page border in every page .Is there any solution to add page border on every page in Pdf file??
Thanks.
Do you mean just like a single color border around the page, touching the edges of the paper? This is very, very difficult with wkhtmltopdf, I would not use it do something like this. Maybe generate the file and "stamp" the borders with a different tool, for example iText (or iTextSharp seeing that you have a .net project) http://itextpdf.com/examples/iia.php?id=119
There's this question of SO: wkhtmltopdf with full page background which basically deals with your issue - trying to set a full page background, which is similar to what you are trying to achieve. You can evaluate the answers, but I think that it's not really an exact science or a reliable method to twist wkhtmltopdf into doing this.

Categories

Resources