topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 1, 2024, 2:47 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Assemble PDF documents  (Read 15382 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Assemble PDF documents
« on: December 30, 2015, 12:52 PM »
I am searching for an intuitive script to combine pdf files from the command line with a script.

I have a base PDF and need to insert several pdf in that file.
A script able to insert pdf from a page is enough in an automated way.
 :-*

Locating :...

https://helpx.adobe....ard-acrobat-pro.html
Actions with adobe acrobat DC . Macros for adobe acrobat.

PdfTk pro     https://www.pdflabs.com/tools/pdftk-pro/

http://www.pdfscript...lic/department35.cfm

Dysprosium http://www.messiahps...ments/Downloads.html

pdf sam http://www.pdfsam.org/

Obviously my problem is that I don't know what select. I only need a script.

 :-*
« Last Edit: December 30, 2015, 03:25 PM by Contro »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #1 on: December 30, 2015, 03:09 PM »
Another one , now free :

http://community.coherentpdf.com/

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #2 on: December 30, 2015, 03:57 PM »

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 888
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Assemble PDF documents
« Reply #3 on: December 30, 2015, 10:13 PM »
I am sure that pdftk would be able to do what you need. I used this once for a slightly different process a couple years ago and it worked fine. Of course you would need to write the command line to do just what you want.  :P
vi vi vi - editor of the beast

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #4 on: December 31, 2015, 05:35 AM »
I am sure that pdftk would be able to do what you need. I used this once for a slightly different process a couple years ago and it worked fine. Of course you would need to write the command line to do just what you want.  :P

And following on from this ^

Concat all PDF files in a directory structure:

https://www.donation....msg374877#msg374877

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #5 on: January 02, 2016, 05:38 AM »
try this - you'll probably want to read up on the PDFTK syntax so you know what its doing, but...

load files singly or drag and drop a list, then sort accordingly

enter the desired pages as a comma separated list (the script uses aliases, so you need to understand their use)

enter the output file (full path)

click the check string button to see what the output looks like (probably a good idea before you press go)

copy the output to the clipboard or just press run (run will create a batchfile, run it, then delete it)

script must go in the PDFTK folder

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #6 on: January 03, 2016, 08:01 PM »
try this - you'll probably want to read up on the PDFTK syntax so you know what its doing, but...

load files singly or drag and drop a list, then sort accordingly

enter the desired pages as a comma separated list (the script uses aliases, so you need to understand their use)

enter the output file (full path)

click the check string button to see what the output looks like (probably a good idea before you press go)

copy the output to the clipboard or just press run (run will create a batchfile, run it, then delete it)

script must go in the PDFTK folder
Target running to try. Forgive me. I haven't seen your answer until now.

Best Regards
 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #7 on: January 03, 2016, 08:03 PM »
I am going to install pdftk and try. The look is splendid.
Now I am sure.

 :P

I will comment

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #8 on: January 03, 2016, 09:49 PM »
I am trying first this :

"C:\Program Files (x86)\PDFtk\bin\pdftk.exe" A="Y:\GABINETE\PROYECTOS\285.15\CRONO\2015\12.2015\17.12.2015.montaje\285.15.Proyecto.pdf" cat 1 35 output "C:\Users\JOSE\Desktop\Montaje PDFs\montadito.pdf"

I put pages 1,35 , but I see only produces two pages. How can I indicate to print from page 1 to page 35 both included ?

Best Regards

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #9 on: January 03, 2016, 10:14 PM »
I can obtain now the range of pages

"C:\Program Files (x86)\PDFtk\bin\pdftk.exe" A="Y:\GABINETE\PROYECTOS\285.15\CRONO\2015\12.2015\17.12.2015.montaje\285.15.Proyecto.pdf" cat 1-35 output "C:\Users\JOSE\Desktop\Montaje PDFs\montadito.pdf"

 :-*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #10 on: January 03, 2016, 10:17 PM »
I have a little problem.

I am losing the initial index or bookmarks

When I mount the pdf with adobe acrobat DC inserting the additional pages i don't lose the index or bookmarks of the base pdf document (initial pdf).

I will continue experimenting with the whole pdf file...
 :-*

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #11 on: January 03, 2016, 11:08 PM »
this is where you're going to need to read up on the PDFTK usage

it's a good reason to make sure you're as clear as possible about ALL your requirements upfront

let us know how you get on

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #12 on: January 03, 2016, 11:14 PM »
I put pages 1,35 , but I see only produces two pages. How can I indicate to print from page 1 to page 35 both included ?

again, you need to make sure you understand the PDFTK syntax - short answer is that the source files are aliased, ie

  • A=file1.pdf
  • B=file2.pdf
  • C=file3.pdf

where file1 is referenced using the alias of 'A', file2 of 'B', and file3 of 'C' (note they MUST be upper case, but the script does this for you)

When inserting pages you use the alias's as follows

     a1,b1-5,c10-end

this should concatenate page 1 from file1 AND pages 1-5 from file2 AND all pages >= 10 from file3 in a new file

if you just want to concatenate the entire files leave the page number field blank and the files should be concatenated in the sort order

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #13 on: January 15, 2016, 07:37 AM »
I am here Target. After a strong bones flu and trying.
First i will learn PDFtk and will comment.

 :tellme:


Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #14 on: January 16, 2016, 03:32 AM »
glad to hear you're feeling better

FWIW you probably need to remember that this isn't a pdf authoring tool in the style of acrobat, so bookmarks are likely to be a challenge (by doing this you're effectively building a completley new document)

I'd need to read up on pdftk to be sure but I suspect this might be beyond PDFTK's capabilities (as others have said, PDF's are a bear to deal with)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #15 on: February 02, 2016, 01:07 PM »
I am here again target. Watching youtube videos of the subject.
I will comment
Best Regards
 :-[

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #16 on: February 02, 2016, 02:16 PM »
glad to hear you're feeling better

FWIW you probably need to remember that this isn't a pdf authoring tool in the style of acrobat, so bookmarks are likely to be a challenge (by doing this you're effectively building a completley new document)

I'd need to read up on pdftk to be sure but I suspect this might be beyond PDFTK's capabilities (as others have said, PDF's are a bear to deal with)

Target I am sure you're right.

So the "target" may be reassure the bookmarks with a compatible tool or reconstruct in any possible way.

In my actual experience the bookmarks and index when mounting several pdf with acrobat seems a matter of "stravaganza" or insecure results.
Sometimes i obtain index without bookmarks o even i can lose the bookmarks.

So all we need i suppose is a complementary tool to do this after assemble the final pdf.


Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #17 on: February 02, 2016, 04:15 PM »
I don't know much about authoring PDF's (I have tolerate/hate relationship with the format) so others might be able to comment, but logically I would assume that you would have to rebuild any/all links when your combining content like this.  Clearly there is going to be new content, and existing content is going to move around, so any pre-existing indexing will almost certainly be redundant.

Indexing aside, can I assume that the script is working as advertised as far as the splitting and merging part goes?

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: Assemble PDF documents
« Reply #18 on: February 02, 2016, 07:13 PM »
I don't know much about authoring PDF's (I have tolerate/hate relationship with the format) so others might be able to comment, but logically I would assume that you would have to rebuild any/all links when your combining content like this.  Clearly there is going to be new content, and existing content is going to move around, so any pre-existing indexing will almost certainly be redundant.

Indexing aside, can I assume that the script is working as advertised as far as the splitting and merging part goes?

Ejem. At the present moment I am studying and seeing examples. I have opened a special sheet to control the changes.
I suppose your scripts works like the angels, but really i don't know yet.

I will try along this week.
Best Regards