Batch Split A3 pdfs (with two A4 pages side by side) into A4 pages and reorder them - pdfminer

Can anyone change any of the code on this page ....
https://stackoverflow.com/questions/13345593/split-each-pdf-page-in-two
to split a document of A3 pages into A4 pages so that they come out ordered. I need to do this to a whole folder of pdfs so ideally would like to be able to do it as a batch changing each filename from ABC.pdf to ABC A4.pdf Each A3 page is made of 2 A4 pages, with the following page numbers
A3 Page 1 is made of A4 page n : A4 page 1
A3 Page 2 is made of A4 page 2 : A4 page n-1
and so on.
Any help would be greatly appreciated - our photocopier will not scan a booklet to separate pages. Annoying!
I tried to use some of the code on Split each PDF page in two?
but it splits it in ways I don't want and I cannot work out the changes needed. I also need it to read all the pdfs from a folder and batch split them all.

Related

pdfbox Nup pdf document

I need to 2-up (A4 to A3 every two A4 pages) a pdf doc. I found this and it works (I use the pdfbox answer) but only for the first new page on the newly created doc. The problem is that when use a loop to add more new pages then it throws an error "Optional group (layer) already exists: left" in the layerUtility.appendFormAsLayer(outPdfPage, formPdf1, afLeft, "left");
UPDATE:
I replaced "left" with "left" + i to have left1,left2 etc but the result is a not well responsive pdf file after 100-200 pages. It is very difficult to navigate pages.

Need help splitting or adding carrage return in text string after 550th character uisng VBA or Formula

I've been struggling with this problem for a few days and was hoping i could find some help here.
I have a text file that when I copy into Excel ends up putting the entire text into cell A1 as one long string. These files can be thousands of characters long but each record is always 550 characters. I need to split this text into sections that are 550 characters long so the first 550 characters will go into cell A1 the second 550 characters go into A2 and so on until the text string is done.
I am at a total loss. Everything I've tried on here hasn't worked for me. But i would consider myself a novice at this.
I'm able to grab the first 550 using these formulas:
=LEFT(Sheet1!A1,550) and
=TRIM(LEFT(SUBSTITUTE(A1,"< /a >",REPT(" ",550),2),550))
As you can see this only gives me the first 550 characters.
Ideally I'd like this to be the end result:
A1 First 550 characters
A2 Second 550 characters
A3 Third 550 characters
A4 Forth 550 characters
A5 ECT until the whole string is broken out.
Any help would be greatly appreciated!
To split on every 550th character, with the raw data in A1:
=MID(Sheet1!$A$1,(ROW(1:1)-1)*550+1,550)
Put that in the first cell and copy down

Printing two A6 booklet sequences from one A4 page

This question is in regards to this answer that was made a long time ago:
getting two A6 complete booklet sequences from an A4 page
I have been trying to create this imposed pdf for a long time using the script but nothing is happening.
First of all I am a n00b in anything related to scripting but can do it when its necessary.
Here is what I did:
I copied the script in text file and changed the extension to .ch and named it new.ch and changed the following values:
file=$1 multivalentpath=$2
to
file=$abc.pdf multivalentpath=$D:\Multivalent.
I put the multivalent.jar file, pdf file and the script in a single folder.
I wrote:
new abc.pdf multivalent relative path
but nothing happens. Can you please help me out here.
Masud

Converting Bulk Text to Hyperlinks in Excel

I am using Excel 2010. I have a column (A), for example that has about 500 numbers, all different. The number in each cell is slightly different. I want to turn them into hyperlinks in bulk(that's easy) if you have the same URL. The twist is that they all have different URLs BUT the URL are not that much different. They are the "same" URLs but the number in the cell is inserted at the end of the URL and that's a specific page.
EXAMPLE.
The first 3 rows (A1, A2, A3) are the numbers (977, 981, 961)
The URLs would show as PleaseHelp.com/index=977 , PleaseHelp.com/index=981, PleaseHelp.com/index=961
I want to put the hyperlink PleaseHelp.com/index="(A1, A2, A3)" and automatically insert what ever is in Row 1 and automatically insert the number and make it a hyperlink.
I know that I will have to use VBA to code but its tough.
A really easy way would be
B1 = HYPERLINK(CONCATENATE("http://www.something.com/index=",A1))
or
B1 = HYPERLINK("http://something.com/index="&A1)
(thanks Siphor)
then you could just fill that down.

Word VBA code to insert documents with diffrent paper sizes?

Hello,
How can I use the Word VBA code to insert another document including its paper size? I mean if I insert 5 documents with different paper sizes then it needs to be in the main document with these different paper sizes.
For example:
Document(1) - A4
Document(2) - Letter
Document(3) - A3
Then in the main document there will be pages with different paper settings like A4, Letter and A3.
How do I code that?
Thanks in advance.
I figured the answer myself and here is the code for it,
Selection.InsertBreak Type:=wdSectionBreakNextPage
You have to use th above code to break the page and then,
Selection.PageSetup.PageHeight = <size>
Selection.PageSetup.PageWidth = <size>
The cursor in the document needs to on the specific page for the above code to work.
To make the page setup apply to the specific part of the document you have to use the Selection as shown above.