-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add css to pdf #356
Comments
If possible, can you please create an inquiry in our official support forum by sharing your sample HTML in .zip format? We will test the scenario in our environment and address it accordingly. Please note that our support forum is the right and appropriate place for such discussions. |
Thank you for your prompt response. I have taken the necessary steps to
address the issue on your official support forum.
Please find the attached .zip file containing the necessary project files.
I hope this assists your team in identifying and resolving the issue
effectively.
Should you require any further information or have additional queries, feel
free to let me know. I truly appreciate your support and attention to this
matter.
Best regards,
Alina
сб, 18 лист. 2023 р. о 00:55 Asad Ali ***@***.***> пише:
… @onopriienkoalina <https://github.com/onopriienkoalina>
If possible, can you please create an inquiry in our official support
forum <https://forum.aspose.com/c/pdf> by sharing your sample HTML in
.zip format? We will test the scenario in our environment and address it
accordingly. Please note that our support forum is the right and
appropriate place for such discussions.
—
Reply to this email directly, view it on GitHub
<#356 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWHUSQ45SMUZ4YVGOPHECMLYE7TOVAVCNFSM6AAAAAA7OPOODWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJXGIZDGNJUG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
We could not find any .zip attached. Also, can you please share the link of the thread where you have reported this issue in the official support forum? |
Please check if it satisfies the following requirements:
If your requirement is actually a bug in our APIs or a feature request for our APIs then please use our forum to report it and get quick help: https://forum.aspose.com/
If all the above requirements are satisfied then please move on:
< describe your free consulting project requirements briefly>
invoices project, i want to generate PDF from HTML. But pdf generets without css styles. Maybe I call string Html = RazorViewToStringFormat.RenderRazorViewToString(this, "IndexSummaryInvoices", summaryinvoices); in not correct place? Which place is correct to call for method RazorViewToStringFormat?
< which platform you're working on -- operating system, development environment etc.>
windows, asp.net mvc 5
namespace LandingPages.Common
{
public class RazorViewToStringFormat
{
///
/// Render razorview to string
///
///
///
///
///
private SummaryInvoices mymodel = new SummaryInvoices();
public static string RenderRazorViewToString(Controller myControler, string viewName, object myModel)
{
myControler.ViewData.Model = myModel;
var viewResult = ViewEngines.Engines.FindPartialView(myControler.ControllerContext, "IndexSummaryInvoices");
// checking the view inside the controller
if (viewResult.View != null)
{
using (var sw = new StringWriter())
{
var viewContext = new ViewContext(myControler.ControllerContext, viewResult.View, myControler.ViewData, myControler.TempData, sw);
viewResult.View.Render(viewContext, sw);
viewResult.ViewEngine.ReleaseView(myControler.ControllerContext, viewResult.View);
return sw.GetStringBuilder().ToString();
}
}
else
return "View cannot be found.";
}
public void GenerateAspose(Controller myControler)
{
try
{
string HtmlContent = RazorViewToStringFormat.RenderRazorViewToString(myControler, "IndexSummaryInvoices", mymodel);
if (!HtmlContent.Equals("View cannot be found."))
{
}
Home controller:
public ActionResult IndexSummaryInvoices(string jsonstr)
{
The text was updated successfully, but these errors were encountered: