Welcome Guest Search | Active Topics | Sign In | Register

Image not displaying on PDF using MVCtoPDF Options
Richard Wagner
Posted: Sunday, August 24, 2014 1:26:12 PM
Rank: Newbie
Groups: Member

Joined: 8/22/2014
Posts: 1
I just purchased a license after testing my code. Im needing to allow users to download a copy of their invoice to PDF.

Everything works fine in development (developing on the actual production server) and when I call the convert MVC to PDF the process takes about 3 seconds in development (using visual Studio 2012 and code written in VB.NET). Image shows up fine from within development mode.

But, after building the application to production it takes about 30 seconds to complete the PDF creation and the company logo image file is missing and replaced with a blue square with a question mark in it.

Here is a sample of the code:


Controller:

<HttpGet>
<EO.Pdf.Mvc4.RenderAsPDF()> _
Function InvoiceAsPDF(orderNumber As String) As ActionResult
Return View(OrderProvider.GetInvoiceSummary(orderNumber, loggedInUser.Database))
End Function


View Page:

.
.
.
<table style="font-size:12px" width="100%">
<tr>
<td width=":60%"> <img src="@Url.Content("~/Images/customLogo.jpg")"/><br />
.
.
.



In addition, I have one other question; I want the PDF to fill the page but right now it appears to have a rather large margin area around the content. I have not been able to figure out how to tell it to have a .3 inch margin and stretch to fill the page. Can you help with how to accomplish this as well (remember Im writing in VB.NET using MVC 4).


thanks so much!!!!

Richard Wagner
eo_support
Posted: Monday, August 25, 2014 9:51:43 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Thanks for your business. Please check this topic for the image problem:

http://www.essentialobjects.com/doc/4/web/troubleshoot.aspx

As to the PDF page size/margin, you can find more information here:

http://www.essentialobjects.com/doc/4/htmltopdf/page_size.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.