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.

Mon Jun 28, 2021 8:56 am

Hi ,

Can we write/start the text at the specified position(without manually) without hardcoding the <BR> tag after the pdf top margins .

I need to start the line at the specified position after the pdf top margin . As of now i have given BR tag for space manually after the top margins

JayanthiJaya
 
Posts: 22
Joined: Thu Jan 21, 2021 6:06 am

Mon Jun 28, 2021 10:54 am

Hello,

Thanks for your inquiry.

You want to specify the starting position of the first line of text when converting HTML to PDF, right? I’m sorry that our plugin conversion method does not have a parameter to specify starting position of the content. But you can achieve the same effect by setting the margin of the PDF document (the code is as follows).
Code: Select all
            HtmlConverter.Convert("https://www.e-iceblue.com/", "HTMLtoPDF.pdf",
            true,
            100 * 1000,
            new SizeF(612, 792),
            new PdfMargins(0, 100,0,0));

Or if I misunderstood, please provide more detailed information for further investigation.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Fri Jul 02, 2021 7:55 am

Hello,

Hope you are doing well.
How is your issue now? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.PDF