Developer forum

Forum » Rapido » Printable papers shows white space, when generated PDF or print

Printable papers shows white space, when generated PDF or print

Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi,

I'm having issues with the printable papers.

It all shows fine, when on the HTML page (Show page) and looks like this:

But when either click the "Print" icon or "Download" icon for PDF it shows some whitespace at bottom and right side of the pages.

Print preview like this:

Downloaded PDF shows this:

I haven't done any custom code to this. I have tried looking around in the included css files, but cant really seem to find the problem for this issue.

Are there any fix to this?

 

Best Regards

Mike


Replies

 
Nicolai Pedersen
Reply

Hi Mike

First of all - which version of Dynamicweb? 9.13 and the later 9.12 versions contains a new pdf component that uses Chrome as rendering engine.

The older version is using a KHTML rendering engine and it does not support the same things as your browser and will render differently - i.e. flexbox is not supported. Also that version is doing a "print" to PDF and when you print you will sometimes encounter margins - not always something we can control from our side but part of the component.

 But my guess is that the markup/css is not 100% compatible with the rendering engine your are currently using.

BR Nicolai

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

Thanks for your response!

Version 9.10.14 is used on the site.

So i guess it needes to be upgraded? or is there an other fix for this?

 

Best Regards

Mike

 
Nicolai Pedersen
Reply

You can write the html to work with the current renderer. Otherwise you need an upgrade. You might be able to just update the PDF rendering by replacing your current PDF rendering 1.? with 2.0

https://www.nuget.org/packages/Dynamicweb.Imaging.Providers.IronPdfProviders/

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

I tried upgrading the PDFProvider

Print preview still shows the white margin at bottom - but now when i try the download pdf it gives me this

System.Exception: Pdf creator constructor exception ---> System.IO.FileLoadException: Could not load file or assembly 'IronPdf, Version=2021.12.0.4495, Culture=neutral, PublicKeyToken=94e1c31412563c75' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Dynamicweb.Imaging.Providers.IronPdfProviders.IronPdfRendererProvider.RenderFromRequest(PdfRequest request, PdfRendererSettings settings) at Dynamicweb.Imaging.Pdf..ctor(String url, String extranetUserName, String extranetPassword, Boolean landscape, Boolean isUsLetterFormat, Int32 leftRightMargin, Int32 topBottomMargin, PdfPaperSize pageSize) --- End of inner exception stack trace --- at Dynamicweb.Imaging.Pdf..ctor(String url, String extranetUserName, String extranetPassword, Boolean landscape, Boolean isUsLetterFormat, Int32 leftRightMargin, Int32 topBottomMargin, PdfPaperSize pageSize) at Dynamicweb.Frontend.PageView.Output()

   
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

Thanks, i will look into that ðŸ˜Š

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

I made it work with downloading after upgrading to 2.0 - I forgot to uploade both .dll, because i thought i only needed the "Dynamicweb.Imaging.Providers.IronPdfProviders.dll"

After checking the post you linked i used the .zip you provided. And uploaded "Dynamicweb.Imaging.Providers.IronPdfProviders.dll" + "IronPdf.dll" (i attached it here aswell)

The issue now is im getting this result instead... 

But i suppose it has something to do with the new form of rendering the new html.

 

Best Regards

Mike

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

Is there any update on this issue?

 

Best Regards

Mike

 
Nicolai Pedersen
Reply

Hi Mike

Yes - we just update to a later version of the pdf engine and also changed the way it is being loaded. Looking at the margin problem is part of that tasks. Currently it is in code review (devops#6780) and once approved and tested by QA it will be released. Hopefully no later than Tuesday.

BR Nicolai

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

Awesome to hear. I'm looking forward to see the result.

I guess this one also includes the error with content breaks through the page, instead of new page? (https://doc.dynamicweb.com/forum/rapido/rapido/printable-papers-content-breaks-through-the-page-instead-of-new-page)

 

Best Regards

Mike

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi NIcolai,

Is it still likely to be fixed this Tuesday? or how is the situation looking like.

Asking from the customer.

 

Best Regards

Mike

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Any updates here on this case?

 

Best Regards

Mike

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

The issue is reproduced on last DW9.13.3 has #6780 (IronPdf 2022.2.0.4887 & Dynamicweb.Imaging.Providers.IronPdfProviders.dll 3.0.0) fix as well. I suppose it's a Rapido issue related to template or styles. I've created new task 7158 will be researched and fixed with related 6947. Sorry for inconvinience.

BR, Oleg QA 

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Oleg,

Thanks for the update.

So just to be clear, it isn't fixed yet, in any of the versions u mentioned? But hopefully will in IronPdf 3.0?

Looking forward to see what you come up with, let me know :)

 

Also i came across another issue, which both happend to me in IronPdf 1.0 and 2.0

It seems like every table with details about the products, cuts the right border, when printed or downloaded

I only managed to fix this with border-collapse: unset; - but that would leave a gap around every corner and at the header.

 

But also sometimes, the details doesn't even show at all, after downloaded

 

Best Regards

Mike

 
Nicolai Pedersen
Reply

Hi Mike

It does not seem like an error in Ironpdf. Earlier the rendering was an old khtml rendering engine that does not understand modern html very well. Therefore old Rapido templates have old html to handle that. But that old html is probably not very compatible with the Chrome rendering engine in ironpdf 3.

So we believe the templates needs to be updated to handle that. We will investigate if that is the case.

 

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

Thanks for your response.

So is there anything i need to change atm?

I guess i might just wait abit to see the result of the overall issue, to check whats gonna be fixed there.

 

Best Regards

Mike

 
Nicolai Pedersen
Reply

You can play around with the template and see if you can fix it. Otherwise you have to wait until we have found out what to do. Either way you need a template update at some point.

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai,

Cool cool, i will wait and see abit.

As i wrote, the only thing i found was border-collapse: unset; - could fix something, but which caused another issue.

 

Do you have any estimated time on this one? since i gotta update the customer, when its expected to be fixed

 

Best Regards

Mike

 
Mike Nicolai Bjerregaard
Mike Nicolai Bjerregaard
Reply

Hi Nicolai, 

Any updates on this and when its expected to be fixed?

 

Best Regards

Mike

 

You must be logged in to post in the forum