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

Place many PDFs in separate Indesign files, reexport to pdf

Community Expert ,
Sep 16, 2009 Sep 16, 2009

Copy link to clipboard

Copied

I hope someone can help me out. I'll looking to automate many pdfs, I have 100's.

I need to place a pdf into indesign in separate files, then re-export back as a PDF again.

All the pdfs have different page counts etc.They are all A4 sized PDFs, 210 x 297mm.

I just want to put all the PDFs into their own InDesign file and reexport to PDF again  and I don't need to save the Indesign file.

Reason I need this:

I need to Save all the pdfs as RTF, and some of the PDFs have bad tags and won't allow me to save as RTF.

I can batch process them in Acrobat to Print to PDF and that works for some, but not all the PDFs, it won't print some of them back to PDF.

I have 100's of these "bad pdfs" and it would be great to be able to place them all into separate indesign files and export out as pdf again. It will be tedious to run the PDF importer and export for all of the files.

It would be great to place and export the pdf again and then have that batch process the rest of the PDFs in the folder? It would need to save it to a different folder so not to override the original

I am just looking to automate the process.


Any help is appreciated.

TOPICS
Scripting

Views

4.0K

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
Engaged ,
Sep 17, 2009 Sep 17, 2009

Copy link to clipboard

Copied

If you don't need the ID file to be saved, why not put all the PDF files in one ID Doc and reprint or export the PDF files? You can easily enough get PDF splitter to separate each page into its own PDF. Try the freebie...?...

http://www.artspdf.com/arts_split_and_merge.asp

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 ,
Sep 18, 2009 Sep 18, 2009

Copy link to clipboard

Copied

That wouldn't work for over a 100 pdfs with different page counts, that would be messier than need be.

I've done them all by hand. I know exactly what I needed, that's why I asked for that specifically.

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
Engaged ,
Sep 17, 2009 Sep 17, 2009

Copy link to clipboard

Copied

Oh, and ID has a script called "PlaceMultipagePDF.applescript". I think (but not positive) that will allow your placing of th4e PDF files in ID a bit more simple.

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
Engaged ,
Sep 17, 2009 Sep 17, 2009

Copy link to clipboard

Copied

Oh, and ID has a script called "PlaceMultipagePDF.applescript". I think (but not positive) that will allow your placing of the PDF files in ID a bit more simple.

Sorry for the hiccup - was trying to fix a typo.

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 ,
Sep 18, 2009 Sep 18, 2009

Copy link to clipboard

Copied

Yes, I know all the other script solutions out there. But none that matched my needs

It doesn't matter now, I did them all manually, it took a long time.

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 ,
Sep 18, 2009 Sep 18, 2009

Copy link to clipboard

Copied

Right, I have a similar request.

I need to place multiple A4 portrait page pdfs into A3 landscape InDesign files. The standard script available places one A4 on every A3 page.

Does anyone know of a script that can intelligently place 2 A4 pdf pages, side by side on an A3 page?

Or, is there someone out there who can write one for me!??

yours.

W

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
Engaged ,
Sep 18, 2009 Sep 18, 2009

Copy link to clipboard

Copied

I just had to do about the same thing as you but with 47 images. It took all of 33 minutes. How did you do all of those separately?

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 ,
Sep 18, 2009 Sep 18, 2009

Copy link to clipboard

Copied

Kathlene,

I had the weirdest deja-vu from W.'s question -- "didn't I just answer that?". Well, yeah, at the bottom of another thread -- http://forums.adobe.com/message/2258991#2258991.

If that's not what you were looking for, you might want to expand on your req.

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
Engaged ,
Sep 21, 2009 Sep 21, 2009

Copy link to clipboard

Copied

Hey There! I believe this question has been answered many times over - both here and there - , but it apparently is not the answer one wants to hear.

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 ,
Sep 21, 2009 Sep 21, 2009

Copy link to clipboard

Copied

Hey right back.

I had a peek at PlaceMultipagePDF.jsx -- unfortunately, I could not test it fully, but this just might work. I removed the 'what-file-what-page' stuff and only changed the actual placing of a file. I have no idea what the stop condition is supposed to do in that function I'm assuming the original writer knew what he was doing.

This script places the PDF pages 2-up, left side at the local (0,0) point, right side at ((page width/2), 0); so you have to take care your new (empty!) document is, in fact, double the width of the PDF pages you are placing.

//DESCRIPTION:Place PDF pages 2-up
// Jongware, 22-Sep-2009
// (based on PlaceMultipagePDF.jsx)

//Make certain that user interaction (display of dialogs, etc.) is turned on.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
//Display a standard Open File dialog box.
var myPDFFile = File.openDialog("Choose a PDF File", "PDF files:*.PDF");
if(myPDFFile == "" || myPDFFile == null)
  exit(0);

myDocument = app.activeDocument;
myPage = myDocument.pages.item(0);
myPlacePDF(myDocument, myPage, myPDFFile);


function myPlacePDF(myDocument, myPage, myPDFFile){
var myPDFPage;
app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;
var myCounter = 1;
var myBreak = false;
while(myBreak == false){
  if(myCounter > 2 && (myCounter & 1)){
   myPage = myDocument.pages.add(LocationOptions.after, myPage);
  }
  app.pdfPlacePreferences.pageNumber = myCounter;
  if (myCounter & 1)
   myPDFPage = myPage.place(File(myPDFFile), [0,0])[0];
  else
   myPDFPage = myPage.place(File(myPDFFile), [app.activeDocument.documentPreferences.pageWidth/2,0])[0];
  if(myCounter == 1){
   var myFirstPage = myPDFPage.pdfAttributes.pageNumber;
  }
  else{
   if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){
    myPage.remove();
    myBreak = true;
   }
  }
  myCounter = myCounter + 1;
}
}

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 ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

That's fantastic Jongware! Just tried it and it works brilliantly.

However, once done I need to reduce each placed page by a % figure, centred.

This is to make sure the headers and footers of the incoming pdf don't obsure the ones on the parent A3 document.

On my test it was 90%, but this could vary.

I guess it must be possible to add another line of code with a % number to automate this as well?

Many thanks, once again

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 ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

It is possible, but if you scale down the placed pdf, the position will be off.

These lines set the scaling:

   myPDFPage.parent.horizontalScale = 90;
   myPDFPage.parent.verticalScale = 90;

and can be placed immediately before the "  if(myCounter == 1)" line, but you'll notice the pages will be scaled towards the current proxy direction (it seems to work fine with the proxy set to 'centered').

Of interest might be that I scale the parent object -- the rectangle placeholder. Scaling the PDF also works, but in that case the frame will stay the same and the PDF is scaled 'inside'.

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 ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

Great! Thanks Jongware, I am impressed - saves so much time.

I like the sound of reducing the contained pdf only, leaving the frame at 100%, as it will allow for faster repositioning to another page using snapping.

Cheers

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 ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

That's a more direct approach:

   myPDFPage.horizontalScale = 90;
   myPDFPage.verticalScale = 90;

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 ,
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

Many thanks J, absolutely perfect. I hope I can return the favour someday.

G

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 ,
Sep 23, 2009 Sep 23, 2009

Copy link to clipboard

Copied

LATEST

Hi Jongware

Many thanks once again for your help. I have one more tweek to make to this code and that is to define which page I want to start loading pdfs from. The original script this is based on does ask me, but the code below does not and I am not sure which line of code I need to do this.

//DESCRIPTION:Place PDF pages 2-up

// Jongware, 22-Sep-2009

// (based on PlaceMultipagePDF.jsx)

//Make certain that user interaction (display of dialogs, etc.) is turned on.

app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;

//Display a standard Open File dialog box.

var myPDFFile = File.openDialog("Choose a PDF File", "PDF files:*.PDF");

if(myPDFFile == "" || myPDFFile == null)

exit(0);

myDocument = app.activeDocument;

myPage = myDocument.pages.item(0);

myPlacePDF(myDocument, myPage, myPDFFile);

function myPlacePDF(myDocument, myPage, myPDFFile){

var myPDFPage;

app.pdfPlacePreferences.pdfCrop = PDFCrop.cropMedia;

var myCounter = 1;

var myBreak = false;

while(myBreak == false){

if(myCounter > 2 && (myCounter & 1)){

myPage = myDocument.pages.add(LocationOptions.after, myPage);

}

app.pdfPlacePreferences.pageNumber = myCounter;

if (myCounter & 1)

myPDFPage = myPage.place(File(myPDFFile), )[0];

else

myPDFPage = myPage.place(File(myPDFFile), )[0];

myPDFPage.horizontalScale = 90;

myPDFPage.verticalScale = 90;

if(myCounter == 1){

var myFirstPage = myPDFPage.pdfAttributes.pageNumber;

}

else{

if(myPDFPage.pdfAttributes.pageNumber == myFirstPage){

myPage.remove();

myBreak = true;

}

}

myCounter = myCounter + 1;

}

}

I need to import more than one document into my A3 document, so I need to be able to determine where to start placing.

Then the script will be perfect - many thanks - hope you can help.

Regards

G

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