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 May 04, 2020 7:43 am

Hello,

I want to print a text in the left margin vertically; is this possible.

averghese
 
Posts: 6
Joined: Mon May 04, 2020 7:40 am

Mon May 04, 2020 9:44 am

Hello,

Thanks for your inquiry.
Sorry I'm not very clear about your needs. Please provide more detailed information to help us better understand your issue, such as your expected output. Or you could provide some screenshots of the print settings when printing in Adobe. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue May 05, 2020 8:46 am

I want to print remarks onto the left margin of a report as thats the only place that has space. I want to turn the alignment of the text vertically.

averghese
 
Posts: 6
Joined: Mon May 04, 2020 7:40 am

Tue May 05, 2020 10:34 am

Hello,

Thanks for your reply.
Do you want to add annotation on the left margin of your PDF document, instead of printing it with a printer? If so, please refer to the following code. However, there is no way to set the text direction of the annotation to vertical. Our Spire.PDF follows PDF standard. And I have verified that Adobe does not support this either.
Code: Select all
    PdfDocument pdf = new PdfDocument();
    pdf.LoadFromFile("input.pdf");
    PdfPageBase page = pdf.Pages[0];

    //initialize a PdfFreeTextAnnotation
    RectangleF rect = new RectangleF(0, 40, 40, 100);
    PdfFreeTextAnnotation textAnnotation = new PdfFreeTextAnnotation(rect);
    //specify content
    textAnnotation.Text = "Free Text Annotation";
    //set properties of annotation
    PdfFont font = new PdfFont(PdfFontFamily.TimesRoman, 10);
    PdfAnnotationBorder border = new PdfAnnotationBorder(1f);
    textAnnotation.Font = font;
    textAnnotation.Border = border;
    textAnnotation.BorderColor = Color.Black;
    textAnnotation.LineEndingStyle = PdfLineEndingStyle.Circle;
    textAnnotation.Opacity = 0.8f;
    //add annotation to page
    page.AnnotationsWidget.Add(textAnnotation);
    pdf.SaveToFile("out.pdf");


Or if I misunderstood, please provide your input file as well as your desired output for our further investigation. You could sent them to us([email protected]) via email.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.PDF