Discussion Locked

Use Acrobat SDK to rotate doc's in PDF

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I downloaded the Adobe Acrobat SDK, and got simple functions running using the 4.0 Type Library.
I need to Rotate my document and save it rotated. Therefore I expect to use the command PDPageSetRotate.
Do I need more references? Which objecttype does this method belong to?

I'd love it if you could give me a few lines of code, to learn by example.

3 replies

by braakhekke

Objecttype: CAcroPDPage. Can be found by pressing F2, and doing a search on e.g. Page.

Try this:

Private Sub Form_Load()
Dim AcroApp As CAcroApp
Dim AcroDoc As CAcroPDDoc
Dim AcroPage As CAcroPDPage
Dim fina As String

fina = "c:\test\ajk0.pdf"

Set AcroApp = CreateObject("AcroExch.App")
AcroApp.Show
Set AcroDoc = CreateObject("AcroExch.PDDoc")
AcroDoc.Open fina
Set AcroPage = AcroDoc.AcquirePage(0)
AcroPage.SetRotate 90

AcroDoc.SetInfo "Title", ""
AcroDoc.SetInfo "Author", "Tree C - PDF Convert"

AcroDoc.Save PDSaveFull, fina
AcroApp.Exit

by braakhekke

Point value changed by question poster.
FREE FOR THE FIRST TO COLLECT!
Any answer accepted (if accompanied by a link to an interesting webpage)

This discussion is closed to new replies.