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

How to change page size in Acrobat Pro XI 11.0.23

Participant ,
May 31, 2023 May 31, 2023

Copy link to clipboard

Copied

Hi,

I do not mean to change from A4 to A3 or like.

I mean to adjust the exact size of inches for a custom paper size.

The reason for asking is that I have a file that needs to be printed and it has a lot of margins, so after removing all margins using the crop pages toolboxes, I am still not satisfied but the result for the printed document, because it still has some margins, while the soft copy has no margins at all.

So I thought about having a custom page size, then printing it.

I will print it on A4 paper.

This is the page after the crop:

mgbsher_0-1685559086996.png

This is the page in print preview:

mgbsher_1-1685559181116.png

So is there any way or workaround to remove all margins and print without margins? I mean to let the printed paper page be precisely like the cropped one without margins.

The real printed paper page is exactly as shown in the preview, which is not what I am looking for.

Thanks

Thanks,
Mohamed GadAllah
TOPICS
General troubleshooting , How to , PDF , Print and prepress

Views

15.7K

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

correct answers 4 Correct answers

Community Expert , Jun 05, 2023 Jun 05, 2023

Hi,

Sorry if my answer is a bit late...

If you want resize your text area manually with distorsion, you can do that importing your file in an empty A4 format file, then place it at the right position and resize it as required.

You can then print this file with the "fit" option to hold the max space of the sheet.

Capture_d’écran_2023-06-05_à_18_00_04.pngCapture d’écran 2023-06-05 à 18.00.18.pngCapture d’écran 2023-06-05 à 18.00.57.pngCapture d’écran 2023-06-05 à 18.01.27.png

 

If your text is editable and you want to automatically resize the pages cropping the closer to the text, you can use this script from the console window or in an action wizard. It wil

...

Votes

Translate

Translate
Community Expert , Jun 06, 2023 Jun 06, 2023

use the "Scale pages to specified size" profile. I think I duplicated and edited this profile to make the new profile "Scale pages to specified size with distortion". Duplicate and re-name the profile from the little fly-out menu "Options", when you have your new profile, click on "Edit" to change the settings.

stretch to fill.png

Votes

Translate

Translate
Community Expert , Jun 11, 2023 Jun 11, 2023

Hi,

Here is what I did for you.

1) Open your file "1.Pages from crop.pdf" then type ctrl J to open the console window.

Capture d’écran 2023-06-11 à 20.41.07.png

If the console window is not empty, click on the trash at the bottom right of the window.

2) Copy and paste the following script in the console window.

 

d0=new Date();
starting=util.printd("mm/dd/yy – HH:MM:ss",d0);
var found=0;
var leftAlign=100;
var topAlign=800;
var bottomAlign=25;
for (var p=0; p<this.numPages; p++) {
	console.clear();
	console.println("Process starting: "
...

Votes

Translate

Translate
Community Expert , Jul 04, 2023 Jul 04, 2023

Here is the last script I used for the book I sent you back in PM:

d0=new Date();
starting=util.printd("mm/dd/yy – HH:MM:ss",d0);
var found=0;
for (var p=0; p<this.numPages; p++) {
	console.clear();
	console.println("Process starting: "+starting);
	console.println("Processing the page #"+(p+1)+"/"+this.numPages);
	if (this.getPageNumWords(p)) {
		var thisPage=this.getPageBox("Crop",p);
		var topAlign=780;
		var bottomAlign=90;
		var topLine=0;
		var header="";
		var bottomLine=0;
		var footer=""
...

Votes

Translate

Translate
Participant ,
Jun 07, 2023 Jun 07, 2023

Copy link to clipboard

Copied

Thanks a lot.

Please, I've tried to import it but failed.

_MGadAllah__0-1686167981681.png

I've just downloaded it and renamed it.

Thanks,
Mohamed GadAllah

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
Community Expert ,
Jun 07, 2023 Jun 07, 2023

Copy link to clipboard

Copied

I suspected a bit!

Do you know how to use action wizards?

@+

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
Participant ,
Jun 08, 2023 Jun 08, 2023

Copy link to clipboard

Copied

Somehow I think I managed to do it.

Much appreciate your valuable time helping me.

Thanks,
Mohamed GadAllah

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
Community Expert ,
Jun 08, 2023 Jun 08, 2023

Copy link to clipboard

Copied

Hi,

Sorry, but I don't understand what did you manage!
Is everything OK for you now?

@+

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
Community Expert ,
Jul 04, 2023 Jul 04, 2023

Copy link to clipboard

Copied

Here is the last script I used for the book I sent you back in PM:

d0=new Date();
starting=util.printd("mm/dd/yy – HH:MM:ss",d0);
var found=0;
for (var p=0; p<this.numPages; p++) {
	console.clear();
	console.println("Process starting: "+starting);
	console.println("Processing the page #"+(p+1)+"/"+this.numPages);
	if (this.getPageNumWords(p)) {
		var thisPage=this.getPageBox("Crop",p);
		var topAlign=780;
		var bottomAlign=90;
		var topLine=0;
		var header="";
		var bottomLine=0;
		var footer="";
		var topChapter=0;
		var chapter="";
		var leftMargin=Number(thisPage[2]);
		var topMargin=0;
		var rightMargin=0;
		var bottomMargin=Number(thisPage[1]);
		for (var i=0; i<this.getPageNumWords(p); i++) {
			var pagination=0;
			var q=this.getPageNthWordQuads(p,i);
			var m=(new Matrix2D).fromRotated(this,p);
			var mInv=m.invert();
			var r=mInv.transform(q);
			var r=r.toString();
			var r=r.split(",");
			if (Number(r[1])>35 && Number(r[1])<820) {
				if (Number(r[1])>topAlign) {
					if (!topLine && Number(r[0])<77) {
						var header=header+this.getPageNthWord(p,i,true)+" - ";
						var theAlignment="left";
					} else if (Number(r[6])>590) {
						header+="- "+this.getPageNthWord(p,i,true);
						var theAlignment="right";
					} else header+=this.getPageNthWord(p,i,false);
					topLine++;
				}
				if (Number(r[1])<bottomAlign) {
					bottomLine++;
					//var footer=this.getPageNthWord(p,i,true);
				}
				if (Number(r[0])<leftMargin) leftMargin=Number(r[0]);
				if (Number(r[1])>topMargin) topMargin=Number(r[1]);
				if (Number(r[6])>rightMargin) rightMargin=Number(r[6]);
				if (Number(r[7])<bottomMargin) bottomMargin=Number(r[7]);
			}
		}
		this.setPageBoxes({
			cBox: "Crop",
			nStart: p,
			rBox: [leftMargin-2,topMargin,rightMargin-2,bottomMargin-2]
		});
		var thisPage=this.getPageBox("Crop",p);
		if (topLine && (theAlignment=="right" || (theAlignment=="left" && header.length<60))) {
			var f=this.addField("header"+p,"text",p,[0,thisPage[1],thisPage[2],thisPage[1]-22]);
			f.textSize=10;
			f.alignment="center";
			f.textFont=font.HelvB;
			f.fillColor=color.white;
			f.value=header;
		}
		if (bottomLine) {
			var f=this.addField("footer"+p,"text",p,[0,12,thisPage[2],0]);
			f.textSize=0;
			f.alignment="center";
			f.textFont=font.HelvB;
			f.fillColor=color.white;
			f.value=this.getPageLabel(p);
		}
		found++;
	}
}
if (found) {
	this.flattenPages();
	this.saveAs(this.path.replace(/.pdf$/i," \(Cropped\).pdf"));
	df=new Date();
	ending=util.printd("mm/dd/yy – HH:MM:ss",df);
	temps=(df.valueOf()-d0.valueOf())/1000/60;
	var theMinutes=parseInt(temps);
	var theSeconds=(temps-theMinutes)*60;
	var theSeconds=parseInt(theSeconds*10)/10;
	var theTime="";
	if (theMinutes>0) {
		if (theMinutes==1) var theTime="1 minute";
		else var theTime=theMinutes+" minutes";
	}
	if (theSeconds>0) {
		if (theSeconds<2) var theTime=theTime+" "+theSeconds+" second";
		else var theTime=theTime+" "+theSeconds+" seconds";
	}
	var theTime=theTime.replace(/^\s+|\s+$/gm,"");
	var plurial=found>1?"s":"";
	var txt="Process starting: "+starting+"\rProcess ending: "+ending+"\rProcess duration: "+theTime+"\r\r"+found+"/"+this.numPages+" page"+plurial+" cropped.";
	console.clear();
	console.println(txt);
	app.alert(txt,3);
}

Attached is a pdf file with a header and a footer you can use if some pages are not correct.

@+

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
Participant ,
Jul 05, 2023 Jul 05, 2023

Copy link to clipboard

Copied

LATEST

Thanks a lot and much appreciated.

I am much thankful for all your help.

Thanks,
Mohamed GadAllah

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
Participant ,
Jun 08, 2023 Jun 08, 2023

Copy link to clipboard

Copied

Hi,

Please, I am digging more and more to find desired results.

Please, and sorry for bothering you, but here is the editable copy of my PDF file:

_MGadAllah__0-1686221447630.png

After I do the crop for all pages, I get this result:

_MGadAllah__1-1686221791970.png

Which is fine and good enough for me.

Now after crop pages using Set Pages Boxes, I found some parts of pages are trimmed, which is making sense of course.

When I hit the Edit PDF option I can find all text editable, so does there is a way to move the headers inside a few inches?

Like here:

_MGadAllah__2-1686222153980.png

So here after I did the crop:

_MGadAllah__3-1686222325935.png

Now when I click on edit PDF I get everything editable, like here:

_MGadAllah__4-1686222474218.png

So my question is:

The area at the far top left of the page, where it says the title of the chapter and book, is an editable box that exists on all pages all over the document, so does there is any way or any profile in PreFlight settings to move the title to the right for all pages, so I can see the title after I cropped the pages?

I mean like this:

 

 

_MGadAllah__5-1686222648321.png

 

 

_MGadAllah__6-1686222735053.png

 

So is it doable?

I hope that I was able to express my point correctly.

This is the final result after the crop:

_MGadAllah__7-1686222856675.png

Which is good for me.

I do hope that you may help 🙂

Thanks,
Mohamed GadAllah

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
LEGEND ,
Jun 08, 2023 Jun 08, 2023

Copy link to clipboard

Copied

No, there is no automation to move the box. Indeed, there is no actual box. It's just invented by the editor each time you visit the page, by guesswork, where it thinks editing would be most convenient. Move two boxes close together, and they are likely to become one box. Put white space in a box, it's likely to become two boxes.

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
Community Expert ,
Jun 08, 2023 Jun 08, 2023

Copy link to clipboard

Copied

I am not a preflight specialist, but  it should not be possible to move text with a preflight profile.

What is possible to do with a script is to copy the text of this first line and add a white field containing this text at the right position and which will hide the original text.

With your screenshots, I guess you didn't use my scripts to crop pages.

If you want to add the header at a correct place, you will have to use a script...

Is it possible for you to share a few pages (about 20 with different chapters) of your file.

@+

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
Participant ,
Jun 08, 2023 Jun 08, 2023

Copy link to clipboard

Copied

Hi,

Thanks a lot for your valuable time helping me.

quote

I guess you didn't use my scripts to crop pages.

If you want to add the header at a correct place, you will have to use a script...

Is it possible for you to share a few pages (about 20 with different chapters) of your file.

@+


By @bebarth

Yes, I was not able to figure out how to use the script and even YouTube videos were not helpful for me.

I am spending a lot of hours so far to figure it out, please excuse my ignorance 😞

I di appreciated the wonderful help I am getting here in the community.

The first trial to remove only the margins and I used the PreFlight to convert the trim box to crop box, is the file titled: 

1. Pages from crop.pdf

And the other trial where I removed extra margins and I want to replace the title box at the top is in the file titled:

2. final Pages from crop.pdf

So you will use the 2nd file titled "2. final Pages from crop.pdf" to adjust the header.

Please, if possible you may share the steps or the technique you will follow so I can learn as this is the most important thing for me regarding this issue.

Thanks for your understanding!

Thanks,
Mohamed GadAllah

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
Community Expert ,
Jun 11, 2023 Jun 11, 2023

Copy link to clipboard

Copied

Hi,

Here is what I did for you.

1) Open your file "1.Pages from crop.pdf" then type ctrl J to open the console window.

Capture d’écran 2023-06-11 à 20.41.07.png

If the console window is not empty, click on the trash at the bottom right of the window.

2) Copy and paste the following script in the console window.

 

d0=new Date();
starting=util.printd("mm/dd/yy – HH:MM:ss",d0);
var found=0;
var leftAlign=100;
var topAlign=800;
var bottomAlign=25;
for (var p=0; p<this.numPages; p++) {
	console.clear();
	console.println("Process starting: "+starting);
	console.println("Processing the page #"+(p+1)+"/"+this.numPages);
	if (this.getPageNumWords(p)) {
		var topLine=0;
		var header="";
		var bottomLine=0;
		var footer="";
		var topChapter=0;
		var chapter="";
		var thisPage=this.getPageBox("Crop",p);
		var leftMargin=thisPage[2];
		var topMargin=0;
		var rightMargin=0;
		var bottomMargin=thisPage[1];
		for (var i=0; i<this.getPageNumWords(p); i++) {
			var q=this.getPageNthWordQuads(p,i);
			var m=(new Matrix2D).fromRotated(this,p);
			var mInv=m.invert();
			var r=mInv.transform(q);
			var r=r.toString();
			var r=r.split(",");
			if (Number(r[0])<leftAlign) {
				if (Number(r[1])>topMargin) topMargin=r[1];
				if (Number(r[7])<bottomMargin) bottomMargin=r[7];
				
				if (Number(r[7])>topAlign) topLine++;
				else if (Number(r[7])<bottomAlign) bottomLine++;
				else if (!topChapter) {
					topChapter++;
					var theBottom=Number(r[7]);
					topMargin=Number(r[1])+50;
				}
			}
			if (topLine && Number(r[7])>topAlign) header+=this.getPageNthWord(p,i,false);
			else if (bottomLine && Number(r[7])<bottomAlign) footer+=this.getPageNthWord(p,i,true);
			else if (topChapter && Number(r[7])==theBottom) chapter+=this.getPageNthWord(p,i,false);
			else {
				if (Number(r[0])<leftMargin) leftMargin=r[0];
				if (Number(r[1])>topMargin) topMargin=r[1];
				if (Number(r[6])>rightMargin) rightMargin=r[6];
				if (Number(r[7])<bottomMargin) bottomMargin=r[7];
			}
		}
		this.setPageBoxes({
			cBox: "Crop",
			nStart: p,
			rBox: [leftMargin,topMargin,rightMargin,bottomMargin]
		});
		var thisPage=this.getPageBox("Crop",p);
		if (topLine) {
			var f=this.addField("header"+p,"text",p,[0,thisPage[1],thisPage[2],thisPage[1]-22]);
			f.textSize=10;
			f.textFont=font.HelvB;
			f.fillColor=color.white;
			f.value=header;
		}
		if (topChapter) {
			var f=this.addField("header"+p,"text",p,[0,thisPage[1],thisPage[2],thisPage[1]-22]);
			f.textSize=10;
			f.textFont=font.HelvB;
			f.fillColor=color.white;
			f.value=chapter;
		}
		if (bottomLine) {
			var f=this.addField("footer"+p,"text",p,[0,22,thisPage[2],0]);
			f.textSize=14;
			f.textFont=font.HelvB;
			f.fillColor=color.white;
			f.value=footer;
		}
		found++;
	}
}
if (found) {
	this.flattenPages();
	this.saveAs(this.path.replace(/.pdf$/i," \(Cropped\).pdf"));
	df=new Date();
	ending=util.printd("mm/dd/yy – HH:MM:ss",df);
	temps=(df.valueOf()-d0.valueOf())/1000/60;
	var theMinutes=parseInt(temps);
	var theSeconds=(temps-theMinutes)*60;
	var theSeconds=parseInt(theSeconds*10)/10;
	var theTime="";
	if (theMinutes>0) {
		if (theMinutes==1) var theTime="1 minute";
		else var theTime=theMinutes+" minutes";
	}
	if (theSeconds>0) {
		if (theSeconds<2) var theTime=theTime+" "+theSeconds+" second";
		else var theTime=theTime+" "+theSeconds+" seconds";
	}
	var theTime=theTime.replace(/^\s+|\s+$/gm,"");
	var plurial=found>1?"s":"";
	var txt="Process starting: "+starting+"\rProcess ending: "+ending+"\rProcess duration: "+theTime+"\r\r"+found+"/"+this.numPages+" page"+plurial+" cropped.";
	console.clear();
	console.println(txt);
	app.alert(txt,3);
}

 

Capture d’écran 2023-06-11 à 20.41.25.png

3) Select all this script typing ctrl A.

Capture d’écran 2023-06-11 à 20.41.37.png

4) Press the "ENTER" key of the numerical panel or the corresponding combinaison of the keypad (certainly ctrl Return).

5) The script run.

Capture d’écran 2023-06-11 à 20.42.28.pngCapture d’écran 2023-06-11 à 20.42.48.png

Attached is the result file from your file.

Here is the positions of the margins in your original file if you try to modify them for an other book...

Capture_d’écran_2023-06-11_à_20_43_54.png

I hope you will understand and will be able to use and modify this script...

@+

...in the last screenshot, read "pts".

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
Participant ,
Jun 17, 2023 Jun 17, 2023

Copy link to clipboard

Copied

@bebarth 

I am much thankful for your valuable help and your valuable time.

The script runs flawlessly with a brilliant result indeed.

Please, to run the script on other files, what parts do I need to edit or change?

  • I will need to edit the following:
  1. Top margin.
  2. Bottom margin.
  3. Right margin.
  4. Left margins.
  • Finally, the top header to set to the middle of the page, or call it to the right or the left after putting the margins. I mean first step to run in the script is to set margins according to the sizes I choose and set, then I want the header of the page which includes the page number, book title, and chapter title to be in the middle of the page after the new margin had been added.

So which parts of the script, do I need to edit?

 

Thanks,
Mohamed GadAllah

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
Participant ,
Jun 17, 2023 Jun 17, 2023

Copy link to clipboard

Copied

An example is attached!

 

Thanks,
Mohamed GadAllah

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
Community Expert ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

Hi,

The problem is that each book has its own layout. For example, in this one the pagination is at the top of the page. It is therefore very difficult to write a script that will be effective for all books without having to adapt it!

With my previous script, we can only change the margins as below:

...
var leftAlign=100;
var topAlign=780;
var bottomAlign=68;
...

and the result after the distorsion preflight is such as the example attached.

I don't know if this result will suit you...

@+

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
Participant ,
Jun 20, 2023 Jun 20, 2023

Copy link to clipboard

Copied

The problem is that each book has its own layout.

Yes, it is.

 

...
var leftAlign=100;
var topAlign=780;
var bottomAlign=68;
...

 

Why there is no line for the right align margin side of the page? as I used to adjust the margins by cropping the four sides of the page using the pages box crop tool.

and the result after the distorsion preflight is such as the example attached.

I don't know if this result will suit you...

The scenario I used to do, is:

1- Use page boxes to crop margins from all sides of the page.

2- Use preflight to resize it to enlarge and fill the page using the profile "Scale pages to specified size", and add dimensions manually 210x297.

3- Finally choose to print it, set the paper size to A4, and choose fit page size.

I do not mean to be impolite, but the attached size is not good for reading if printed.

Please, is it possible that me to calculate the crop margins manually first for the four sides of the page then add it to the script, then run the script? so the main idea for the script is to set the header of the page which includes:

* Page number.

* Chapter title (if exist).

* Book title (if exists).

Set this header to the middle of the page.

Then I print it.

Am I following you correctly or did I miss understood what you said?

Thanks,
Mohamed GadAllah

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
Participant ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

Hi,

Just want to sincerely thank every member here in the community as it is a treasure indeed, and especially @bebarth for the invaluable and amazing help I've got.

Thanks a lot indeed.

Thanks,
Mohamed GadAllah

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
Community Expert ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

The best way to thank those who helped you would be to mark those answers as correct.

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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
Participant ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

I've marked the replies that provided solutions as the correct answer.

But there are too many other useful replies, may I mark more?

Thanks,
Mohamed GadAllah

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
Community Expert ,
Jun 28, 2023 Jun 28, 2023

Copy link to clipboard

Copied

What and how many you mark is up to you, but they should be answers that directly related to your original post/question.

 

David Creamer: Community Expert (ACI and ACE 1995-2023)

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