# Free text is getting auto rotated for few PDFs

**URL:** <https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [July 6, 2022, 7:46am UTC](https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833 "2022-07-06T07:46:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshan](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lakshan](https://pdfjs.community/u/lakshan)\
**Post date:** [July 6, 2022, 7:46am UTC](https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833/1 "2022-07-06T07:46:44Z")

</div>

Special PDF

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/d9128fb3186272711ce846c623b8294883ea6f1a.png)

is there anyway to fix this?

It’s working as expected in other PDFs

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/efb492a172a15bde199d635ab49d4f9ffac931c9.png)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [July 6, 2022, 7:46am UTC](https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833/3 "2022-07-06T07:46:50Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:
- [Create free text annotations in PDF.js Express](https://pdfjs.express/documentation/annotation/create-annotation-free-text)
- [Freeform rotation for annotations](https://pdfjs.express/documentation/annotation/freeform-rotation)
- [Understand coordinates in PDF.js Express - PDF page coordinates](https://pdfjs.express/documentation/viewer/coordinates.8#pdf-page-coordinates)

APIs:
- [Core.Tools.FreeTextCreateTool - isAutoFocusingOnCreate()](https://pdfjs.express/api/Core.Tools.FreeTextCreateTool.html#isAutoFocusingOnCreate__anchor)
- [CoreControls.AnnotationManager - disableFreeTextEditing()](https://pdfjs.express/api/7.0/CoreControls.AnnotationManager.html#disableFreeTextEditing__anchor)
- [Core.AnnotationManager - isFreeTextEditingEnabled()](https://pdfjs.express/api/Core.AnnotationManager.html#isFreeTextEditingEnabled__anchor)

Forums:
- [Customize freetext tool to change text and behavior programatically](https://pdfjs.community/t/customize-freetext-tool-to-change-text-and-behavior-programatically/94/5)
- [Export and import of DatePickerWidgetAnnotation](https://pdfjs.community/t/export-and-import-of-datepickerwidgetannotation/1782/7)
- [PDF Rotation in the merge save](https://pdfjs.community/t/pdf-rotation-in-the-merge-save/688/1)

---

<div class="post-metadata">

**Author:** ![zserviss](https://avatars.discourse-cdn.com/v4/letter/z/a9a28c/32.png) [@zserviss](https://pdfjs.community/u/zserviss)\
**Post date:** [July 6, 2022, 4:40pm UTC](https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833/4 "2022-07-06T16:40:05Z")

</div>

Hi Lakshan,

Could you provide some more information to help with this issue.

1. Could you please describe exactly what the issue is that you are experiencing?
2. Could you provide the PDF that this issue is happening on?
3. What version of PDFjs Express does this appear on?

Best Regards,  
Zach Serviss  
Web Development Support Engineer  
PDFTron Systems, Inc.

---

<div class="post-metadata">

**Author:** ![lakshan](https://avatars.discourse-cdn.com/v4/letter/l/ad7895/32.png) [@lakshan](https://pdfjs.community/u/lakshan)\
**Post date:** [April 18, 2023, 5:36am UTC](https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833/5 "2023-04-18T05:36:52Z")

</div>

We are programmatically generating free text with each annotation using below code

```
            const freeText = new Annotations.FreeTextAnnotation();
            var timeStamp = serverTime ? serverTime : moment().format("MM-DD-YYYY HH:mm:ss");
            freeText.PageNumber = PageNumber; //el.PageNumber;
            freeText.X = X; //el.LeftMost;
            freeText.Y = Y + Height; //el.BottomMost;
            freeText.Width = authorWidth;
            freeText.Height = authorHeight;
            freeText.setContents(userObj.nickname + "\n" + timeStamp);
            freeText.FontSize = "12pt";
            freeText.Locked = true;
            freeText.NoDelete = true;
            freeText.LockedContents = true;
            freeText.NoMove = true;
            freeText.StrokeThickness = 0;
            freeText.Id = el.Ry + "-author";
            freeText.Subject = "author";
            freeText.TextColor = new Annotations.Color(59, 108, 180);
            annotManager.addAnnotation(freeText);
            annotManager.redrawAnnotation(freeText);

```

But for some documents this text is getting rotated. Can you tell me a way to place free text annotations fixed without rotating no matter what the orientation is

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [May 1, 2023, 10:27pm UTC](https://pdfjs.community/t/free-text-is-getting-auto-rotated-for-few-pdfs/1833/6 "2023-05-01T22:27:48Z")

</div>

Hello lakshan,

We have the `.NoRotate` property on the annotation you can set

Best regards,  
Tyler
