• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
12

File size is increased after PDF rotation

New Here ,
Apr 02, 2024 Apr 02, 2024

Copy link to clipboard

Copied

Hi team,

 

We have the pdf with default page rotation as 90 degree, however we tried to change the rotation of the PDF by folowwing the below steps, the file size is drastically increased.

 

Please help us to reduce the file size with Rotation set to zero by default

 

Steps we followed to rotate the file :

Tools required – Adobe Acrobat Standard, Adobe Acrobat Distiller and PDF Xchange Editor.

1. Convert to PostScript (ps) format:

  • Open the PDF file in Adobe Acrobat Standard (Please keep two copies of the original PDF file).
  • Save the file as a PostScript (ps) file. This file will be used later to create a new PDF with 0% rotation.

2. Create PDF setting file:

  • Open Adobe Distiller.
  • Go to Settings -> Edit Adobe PDF Settings.
  • In the settings, ensure:
    • Auto-Rotate Pages is set to Off.
    • Page Size matches the original PDF.
  • Click Save As and give the file a descriptive name (e.g., "ZeroRotation.joboptions"). This file defines the settings for creating a new PDF with 0% rotation.

3. Generate New PDF with 0% Rotation:

  • Open Adobe Distiller again.
  • Go to Settings -> Add Adobe PDF Settings and select the joboptions file you just created (e.g., "ZeroRotation.joboptions").
  • Go to File -> Open and select the PostScript (ps) file from step 1.
  • This will create a new PDF with 0% rotation, but the form fields will be flattened (not editable).

4. Replace Pages in Original PDF:

  • Open the original PDF file in “PDF Xchange Editor”.
  • Go to Organize -> Replace Pages.
  • Select the new PDF file generated in step 3 (flattened with 0% rotation).
  • Click OK. This replaces the pages in the original PDF with the new ones, keeping the 0% rotation but causing the form fields to appear incorrect order.

5. Rotate Form Fields with Javascript:

  • Go to Form -> JavaScript Console.
  • Paste the following code into the console:

var box = getPageBox();

var  w = box[2] - box[0];

var  h = box[1] - box[3];

for(i=0; i<numFields; i++) 

   var f = getField(getNthFieldName(i));

   var orig = f.rect;

   f.rect = [orig[3], h-orig[0], orig[1], h-orig[2]];

   f.rotation = 0;

 

  • Click the Run button. This will rotate the form fields 90 degrees to match the 0% rotation of the document. 
TOPICS
Create PDFs , Edit and convert PDFs , General troubleshooting , PDF , PDF forms

Views

81

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 02, 2024 Apr 02, 2024

Copy link to clipboard

Copied

LATEST

Try this instead:

Run this code in the console window

 

this.setPageRotations(0,this.numPages,0);

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines