Free text is getting auto rotated for few PDFs

Special PDF

is there anyway to fix this?

It’s working as expected in other PDFs

1 Like

Hello, I’m Ron, an automated tech support bot :robot:

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

Guides:APIs:Forums:

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.

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

Hello lakshan,

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

Best regards,
Tyler