• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Rectangle all PDF s

New Here ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

Dear members

I'm using Adobe Acrobat Standard DC version 2017.012.20098. It is intented to provide  all the pages (total 500 pages) of a rectangle (around the page). Same rectangle, some color, etc...

In total there are 500 pages.

The rectangle of page 1 is a exact copy for the other page 499. Now we do this manually. Is there a easy way to perform this?

Thank you

Greetz

TOPICS
Edit and convert PDFs

Views

1.8K

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
1 ACCEPTED SOLUTION
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

You can use this code to do it:

for (var p=0; p<this.numPages; p++) {

    var pageRect = this.getPageBox("Crop", p);

    this.addAnnot({type: "Square", page: p, rect: pageRect, width:5, strokeColor: color.red, opacity: 1, readOnly: true, lock: true});

}

Play around with the width value to get wider or narrower frames.

If your files doesn't contains other fields or comments you can run this command at the end of the process to convert the square comments into static graphics:

this.flattenPages();

View solution in original post

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 ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

Do you mean like a black frame around the edges of the page? It's possible, but if you want it to not be interactive then you need to flatten the file after adding it. Does your file contain any form fields or comments?

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
New Here ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

Dear try67

Thank you for you respons.

Yes for example a red frame.

I start by inserting a rectangle on page 1. I do this by inserting "rectangle" with tools. This rectangle appears on the full edge of the page. I can choose in the rectangle properties for the color ( black, red, etc..) Now I have to do this 499 times.

yes its a paper (pdf) with some text and technical stuff. But around the page its white. How is it possible do this?

Below is the paper and the red frame is exact what i want.

frame.jpg

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 ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

You can use this code to do it:

for (var p=0; p<this.numPages; p++) {

    var pageRect = this.getPageBox("Crop", p);

    this.addAnnot({type: "Square", page: p, rect: pageRect, width:5, strokeColor: color.red, opacity: 1, readOnly: true, lock: true});

}

Play around with the width value to get wider or narrower frames.

If your files doesn't contains other fields or comments you can run this command at the end of the process to convert the square comments into static graphics:

this.flattenPages();

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
New Here ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

Dear try67

Thank you for you respons.

It seems to something complex:)

May is ask where I can enter this code?

If u want, uffcourse, can u send me a few print screens because an image says always more:).

Thank 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
Community Expert ,
Oct 17, 2017 Oct 17, 2017

Copy link to clipboard

Copied

LATEST

Less complex than doing it manually, for sure...

You can execute this code from the JS Console or if you wish I can create for you a script that will add a menu item to the application, so you could do it with a single click. You can contact me at try6767 at gmail.com to discuss it further.

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 ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

One trick that I have used in the past is to make a jpg file that is the box.  Then, in the Edit PDF toolset, I go to the 'More' tools, and add a Background:

add_bg1.jpg

You can tweak the position, size, etc. before applying it.  You can even specify to what pages the image is added.

addbg2.jpg

I hope this is helpful.

My best,

Dave

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
New Here ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

Dear Dave

Thanl you for you response.

Bellow is the paper that i use (500 times) and the RED rectangle i insert this from tools.

Based on the following (see bellow-that's what I wanted - The red rectangle I insert this from tools then rectangle.). how will my JPG file look like .Where and how is this JPG file created?

frame.jpg

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