Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7163027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:49:56+00:00 2026-05-28T13:49:56+00:00

It is the first time I ask a question on this forum. Sorry if

  • 0

It is the first time I ask a question on this forum. Sorry if my English is not right, this not my mother tongue langage. Usually I always find my answers on this forum or by Googling. But this time, I didn’t find.

Here is my question (Mac OS X Lion):

I have few PDFs. For testing, I rotate some pages with “Preview” and/or rotate some pages of the PDF programmatically with PDFKit ([PDFPage setRotation:90]). I save this new PDF. The output is a PDF with some rotated pages. I re-open in Preview or other, to make sure everything ok. This is fine, the display is right. so far so good.

Now, I open this new created PDF and I’m trying to get the PDF pages rotation values (page by page). I tried with the PDFKIT methods [PDFPage rotation] or with Quartz methods with the CGPDF… (CGPDFPageGetRotationAngle), I always get a value 0 for the rotation of the page. NSLog(@”value :%d”, angle)

How to reproduce, with the PDFKIT methods, simply use the “PDF Annotation Editor” code from Apple. Open a PDF with some page in Landscape and in Portrait. The display will be as expected. But now Trying to read the value rotation at the line ‘rotation = [page rotation];’ in the transformContextForPage:(PDFPage*)page method, I always get 0. When the expected values should be 0 or 90 depending on the page. Same problem when trying to use the Quartz Method with CGPDFPageGetRotationAngle.

Am I missing something ? Is it a bug ? or my understanding of the Rotation of a PDF page is wrong ?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:49:57+00:00Added an answer on May 28, 2026 at 1:49 pm

    In PDF you can create rotated pages in 2 ways: set page size to 8.5*11in and set the Rotate page attribute to 90, or simply set the page size to 11*8.5in. Visually there is no difference.
    The problem with Preview (and I assume also PDFKit behind it) is that when you set the rotation to 90, it does not simply set the Rotate attribute to 90, but it switches the page width and height and applies a transformation on the page content stream so that the page content appears rotated. Because the [PDFPage rotation] and CGPDFPageGetRotationAngle return the value of the Rotate attribute, they will always return 0 on pages rotated with Preview and PDFKit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry, this's my first time to ask a question here. So, I don't have
This is the second time I ask this question because in my first try
First time asking a question here. Usually I can find my answer without having
First time posting in Stack Overflow, hope I'm doing this right. I'm writing an
This is the first time I ask something, so if there is something wrong
Ok, I am not sure how to ask this question so that it can
This question may sound weird, but it's first time I do it and cannot
First time poster here. A quick question about setting up a loop here. I
Forgive a newbie, I don't even know how to ask this question properly: I
I am currently working on an ASP.NET MVC2 project. This is the first time

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.