TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nageshwar Rao
NA
74
37.4k
Convert html to pdf
Sep 7 2016 11:37 AM
i have tried with different .net packages.my code is like this
using System;
using EO.Pdf;
using System.Drawing;
using System.Web;
namespace HTMLtoPDF5
{
class Program
{
static void Main(string[] args)
{
try
{
string Url = "https://v16smoke.smartappbeta.com/enterprisedesktop/DocumentItemDetails.aspx?smartItemId=1610934&sessionid=c4c515ca90724e0e964aae9256b146b0&pageMode=view";
HtmlToPdfOptions opts = new HtmlToPdfOptions();
opts.AutoFitX = HtmlToPdfAutoFitMode.ScaleToFit;
opts.AutoFitY = HtmlToPdfAutoFitMode.None;
opts.ZoomLevel = 1;
// opts.NoScript = true;
// opts.PageSize = PdfPageSizes.A4;
opts.OutputArea = new System.Drawing.RectangleF(0.5f, 0.5f, 8.267f, 11.692f);
HtmlToPdf.ConvertUrl(Url, @"C:\Pictures\Testing2.pdf", opts);
}
catch (Exception ex)
{
Console.WriteLine("Error");
}
}
}
}
but contents in the html are not getting in pdf only few are getting remaining contents are not visible nut two pages are getting in pdf,one is empty
Reply
Answers (
5
)
How to convert html to pdf
how to select current date automatically in mvc using angula