Rank: Newbie Groups: Member
Joined: 9/9/2013 Posts: 3
|
Hi all readers, and thank you for taking the time to read this question.
I have this little issue with converting html to PDF. The conversion itself works like a charm, however when converting we wish to set a margin left and right that are the minimum left and right margins used when the page spans more the one page and is scaled down to one page.
However when the page is less wide then the maximum width - margins the page needs to be centered in the pdf, but unfortunately I can not figure out at this moment how to do this? Can you help?
For my second problem - when I use the option AutoFixX and Y with the option HtmlToPdfAutoFitMode.ScaleToFit my export page is blank...
Thank you for taking the time to answer my questions..
Kind regard,
Michel
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi,
If you want to center your page, you will center it in your HTML, not center it with the HTML to PDF converter. For example, if you have a table that is 1000 pixels wide, and you have a 100 pixel wide image that is centered in the table cell, then the converter will use that 1000 pixels as page width, and correctly center the image based on your table cell alignment settings. The rule is, whatever layout adjustment you want to do, you do it with your HTML.
I do not know why the page is blank when you set AutoFitX/AutoFitY. You may want to test it with a simple page, then gradually add contents into the page and see what part breaks it. Usually when you find out what breaks it, it will make sense to you. If that still does not make sense to you, you can send the HTML to us and we will be happy to take a look.
Thanks!
|
Rank: Newbie Groups: Member
Joined: 9/9/2013 Posts: 3
|
Thank you for your reply, we are at this moment building our code based on the demo version of your software, however we are in the process of ordering either the 1 or 3 developer licence from your company.
regarding the center form in the HTML - I already figured this, although I had hoped that there was a way to get the width of the html to calculate the margins left and right.
About the problem we encounter using ScaleToFit, we do not get an error, we just get a blank page when using this option.
Kind regards,
ing. Michel R. Pasman Saybolt International (Corelab)
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,201
|
Hi,
As we have already replied in our previous reply, you will want to try to test with a simple page and then gradually add contents back to see what breaks ScaleToFit. Once you find that out, if it still does not make sense to you, you can send the page to us and we will look further.
Thanks!
|