Rank: Newbie Groups: Member
Joined: 4/12/2016 Posts: 4
|
We're having some significant troubles using EO.pdf (v 16.0.1.0) to create PDF and image files.
We have a collection of objects. We loop through that collection, creating a url and and file path, and then a PDF and image for each.
At this point, in a collection of about 250 objects we're only creating 2 pdf files and no images. We've verified the urls and the file path.
With PDF creation, we get one error consistently (see below). With images, we get two different errors. There seems to be no rhyme or reason for why we get one error over the other (we are only getting one error with each attempt). See below for both errors.
One thing we have found is that if we don't attempt to create images (just comment out that piece of code) all of our PDFs are being generated as expected. The reverse isn't true. If we don't attempt to create PDFs, we still are not able to generate images and the same two errors are encountered.
What can we try next?
PDF Creation Error:
Exception:
"Object reference not set to an instance of an object."
at EO.Internal.o5.a(ady A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, Boolean A_6) at EO.Pdf.HtmlToPdfSession.a(ady A_0, String A_1, String A_2, Int32 A_3, Int32 A_4, Boolean A_5) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options) at LM.Ignite.FileGenerator.PdfGenerator.GeneratePdfFromUrl(PdfData pdfData) in C:\git\redactedclientname\src\LM.Ignite.FileGenerator\PdfGenerator.cs:line 34 at LM.Ignite.Schedulers.MemberFilesGenerator.GenerateMemberLibertyScorePdf(String url, String fileName, IEOSettings settings) in C:\git\redactedclientname\src\LM.Ignite.Shedulers\MemberFilesGenerator.cs:line 172 at LM.Ignite.Schedulers.MemberFilesGenerator.UpdateMemberFiles(IMemberProfile memberProfile, IEOSettings settings) in C:\git\redactedclientname\src\LM.Ignite.Shedulers\MemberFilesGenerator.cs:line 132 at LM.Ignite.Schedulers.MemberFilesGenerator.GenerateNewFiles(Database database) in C:\git\redactedclientname\src\LM.Ignite.Shedulers\MemberFilesGenerator.cs:line 78
Parameters into EO.Pdf.HtmlToPdf.ConvertUrl:
- url = "http://redactedclientname.local/members/orrin-hatch/liberty-score/?pdf=true" - Note: I've verified in a browser this page renders as expected - pdfFileName = "C:\Sitecore\redactedclientname.local\Website\temp\Pdf\300052_20160411.pdf"
Image Creation Error:
Exception #1:
"Conversion failed. Browser engine failed to render page."
at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Internal.a3e.d() at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options) at LM.Ignite.FileGenerator.PdfGenerator.GenerateImageFromUrl(ImageData imageData) in C:\git\redactedclientname\src\LM.Ignite.FileGenerator\PdfGenerator.cs:line 103 Inner Exception: "Browser engine failed to render page."
at EO.Internal.o5.e() at EO.Internal.o5.a(a7t A_0, WriteArgDelegate A_1) at EO.Internal.o5.a(HtmlToPdfOptions A_0, Single A_1, Single A_2, Size A_3, Rectangle A_4, amh A_5, List`1 A_6) at EO.Internal.a3e.a(String A_0, Single& A_1) at EO.Internal.a3e.d() Parameters into EO.Pdf.HtmlToPdf.ConvertUrl: - url = "http://redactedclientname.local/members/sean-duffy/liberty-score/?pdf=true" - Note: I've verified in a browser this page renders as expected - pdfFileName = "C:\Sitecore\redactedclientname.local\Website\temp\Images\412488_20160411.jpg" - HtmlToPdfOptions: - GeneratePageImages = true - options.SaveImageAsJpeg = true - options.PageSize = new SizeF(6.2, 3.6) - options.OutputArea = new RectangleF(0f, 0f, 6.2, 3.6) - options.VisibleElementIds = pdf-header;liberty-card-overview; - Note: I've verified both of these id's exist in the markup of the url - options.JpegQualityLevel = 50 - options.PreserveHighResImages = false Exception #2:
"Object reference not set to an instance of an object."
at EO.Internal.o5.a(ady A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, Boolean A_6) at EO.Pdf.HtmlToPdfSession.a(ady A_0, String A_1, String A_2, Int32 A_3, Int32 A_4, Boolean A_5) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options) at LM.Ignite.FileGenerator.PdfGenerator.GenerateImageFromUrl(ImageData imageData) in C:\git\redactedclientname\src\LM.Ignite.FileGenerator\PdfGenerator.cs:line 103 at LM.Ignite.Schedulers.MemberFilesGenerator.GenerateMemberLibertyScoreImage(String url, String fileName, IEOSettings settings) in C:\git\redactedclientname\src\LM.Ignite.Shedulers\MemberFilesGenerator.cs:line 160 at LM.Ignite.Schedulers.MemberFilesGenerator.UpdateMemberFiles(IMemberProfile memberProfile, IEOSettings settings) in C:\git\redactedclientname\src\LM.Ignite.Shedulers\MemberFilesGenerator.cs:line 135 at LM.Ignite.Schedulers.MemberFilesGenerator.GenerateNewFiles(Database database) in C:\git\redactedclientname\src\LM.Ignite.Shedulers\MemberFilesGenerator.cs:line 78
Parameters into EO.Pdf.HtmlToPdf.ConvertUrl: - url = "http://redactedclientname.local/members/sean-maloney/liberty-score/?pdf=true" - Note: I've verified in a browser this page renders as expected - pdfFileName = "C:\Sitecore\redactedclientname.local\Website\temp\Images\412562_20160411.jpg" - HtmlToPdfOptions: - GeneratePageImages = true - options.SaveImageAsJpeg = true - options.PageSize = new SizeF(6.2, 3.6) - options.OutputArea = new RectangleF(0f, 0f, 6.2, 3.6) - options.VisibleElementIds = pdf-header;liberty-card-overview; - Note: I've verified both of these id's exist in the markup of the url - options.JpegQualityLevel = 50 - options.PreserveHighResImages = false
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
Please try to update to the latest build (16.0.49.0). We have fixed a number of issues since the initial build. If you still have problems please let us know.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 4/12/2016 Posts: 4
|
Thanks!
The update did get us closer. PDFs are now being generated but images are not - we are seeing one consistent error with the image generation:
"Conversion failed. Browser engine failed to render page. Failed on command 4"
at EO.Pdf.HtmlToPdfException.b(Exception A_0) at EO.Internal.a3f.d() at EO.Pdf.HtmlToPdf.ConvertUrl(String url, PdfDocument doc, HtmlToPdfOptions options) at EO.Pdf.HtmlToPdf.ConvertUrl(String url, String pdfFileName, HtmlToPdfOptions options) at LM.Ignite.FileGenerator.PdfGenerator.GenerateImageFromUrl(ImageData imageData) in C:\git\redactedclientname\src\LM.Ignite.FileGenerator\PdfGenerator.cs:line 103
Inner Exception:
"Browser engine failed to render page. Failed on command 4"
at EO.Internal.o3.a(String A_0) at EO.Internal.o3.a(e A_0, a7u A_1, WriteArgDelegate A_2) at EO.Internal.o3.a(HtmlToPdfOptions A_0, Single A_1, Single A_2, Size A_3, Rectangle A_4, amg A_5, List`1 A_6) at EO.Internal.a3f.a(String A_0, Single& A_1) at EO.Internal.a3f.d()
Parameters into EO.Pdf.HtmlToPdf.ConvertUrl:
- url = "http://redactedclientname.local/members/suzanne-bonamici/liberty-score/?pdf=true" (I've verified in a browser this page renders as expected) - pdfFileName = "C:\Sitecore\redactedclientname.local\Website\temp\Images\412501_20160412.jpg" - HtmlToPdfOptions: - GeneratePageImages = true - options.SaveImageAsJpeg = true - options.PageSize = new SizeF(6.2, 3.6) - options.OutputArea = new RectangleF(0f, 0f, 6.2, 3.6) - options.VisibleElementIds = pdf-header;liberty-card-overview; - Note: I've verified both of these id's exist in the markup of the url - options.JpegQualityLevel = 50 - options.PreserveHighResImages = false
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi, This might have to do with the image files. Can you try to isolate the problem into a test project and send the test project to us? See here for more details on sending test project: http://www.essentialobjects.com/forum/test_project.aspxThanks!
|
Rank: Newbie Groups: Member
Joined: 4/12/2016 Posts: 4
|
Our current project is large and requires too many external dependencies to be able to send you a compilable and runnable version. However, I was able to create a small, self-contained test app that uses the EO objects and fails in the exact same way. I have just sent that to the support email address.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 4/12/2016 Posts: 4
|
I sent this in an email to support as well but unfortunately, we've discovered a second issue after the upgrade to 16.0.49.0.
We're building the PDF files in a loop. When the count starts to increase (currently above about 40 items), we start to receive time out errors from the EO browser. At that point though, the site is still working fine and urls that we are requesting render in a browser with no problem.
On our DEV server, this happens at a much lower point - 1 or 2 PDFs are generated before the time outs start.
I don't have access to the DEV server's specs but can track that down if it would be helpful for troubleshooting. Locally, where I can create about 40 PDFs before the issue starts, I am running Windows 10 with an i5 processor and 16GB of RAM.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We have resolved the first issue you reported. In the test project you sent to us it creates PDF file in a loop. We did not notice the time out error in that app. Is there anyway to make the time out error occurs in that test app?
Thanks!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is just to let you know that we have posted a new build that should resolve the first issue you reported. You can download the new build from our download page and see if it works for you.
We did receive the test project for the second issue but we are still working on it. We will reply again as soon as we have any update on that one.
Thanks!
|