Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Fri Mar 22, 2019 2:36 pm

Hi,

first: Spire.PDF is a really great component and it makes live easier every day.

But now i'm running into a problem i can't resolve. I'm trying to generate a PDF document from a HTML string.
Generating it on live server with a "real" IIS everything looks fine and smooth. :-)

But when using it in my developing environment (Visual Studio 2017, IIS Express), the HTML is complete wrong.
Wrong font, wrong measures, everything looks wrong when opening the PDF.

Any idea is appreciated.

Thanx in advance

Best regards, Henner

allesBuchen
 
Posts: 2
Joined: Fri Sep 14, 2018 10:27 am

Mon Mar 25, 2019 8:29 am

Hello Henner,

Thank you for contacting us.
I simulated your scenario and tested with our Spire.PDF Pack(Hot Fix) Version:5.3.8, but I didn't reproduce your issue. As for your situation, I suggest you try again with the latest version. If the issue still occurs after trying, please provide below more information to help us further look into it. You could send them to us via email ([email protected]). Thanks in advance.
1. Your input HTML string.
2. Your full testing code.
3. Your generated PDF.
4. The system ( e.g. Win 7, 64-bit ).
5. The region information ( e.g. China, Chinese).

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Mon Mar 25, 2019 9:24 am

Hi Lisa,

thanks for your answer. Meanwhile i found out what the problem seems to be.
My development environment gets the HTML to convert via „localhost“ from IIS Express.
This seems to force an "intranet" behavior like a very old IE (compatibility mode).

Adding the meta tag

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1“>

brings the right effect and it now looks nearly like the productive server result.
Trying this on the productive site to makes the result a little bit less sharp that without.
So i’m just setting the tag when running on develop.

After all it's just a workaround but it brings the wanted effect.

Thanx again and best regards,

Henner

allesBuchen
 
Posts: 2
Joined: Fri Sep 14, 2018 10:27 am

Mon Mar 25, 2019 9:36 am

Hello Henner,

Glad to hear that and thank you for sharing your solution! If we can help you with anything else, just feel free to contact.
Wish you all the best!

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF

cron