Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Insert Append tool allows for inserting a pdf document to the start or end of any pdf file, but what about if it added it to every page of one zip file.

essentially creating a "back.pdf" pdf to be added as every even or odd.

"fronts file.pdf" + "back.pdf" every even page:

Result: New.pdf > front,back,front,back end
72
Ideas/Suggestions / Re: Stamps: Filename (without file extension)
« Last post by nightslayer23 on June 23, 2021, 07:10:59 AM »
WOO! LEGENDARY
73
Ideas/Suggestions / Re: Stamps: Filename (without file extension)
« Last post by RTT on May 19, 2021, 02:09:38 AM »
Add a text stamp and set it dynamic. Click the configure button and from the script type objects options add a new script and name it FilenameNoExt.
Set the script code as:
Code: [Select]
function FilenameNoExt() {
    var Filename = BatchFile.filename;
    return Filename.substring(Filename.lastIndexOf('\\') + 1, Filename.lastIndexOf('.'))
}
You can now type [<FilenameNoExt>] as the stamp text to stamp the PDF filename without the file extension.
74
Ideas/Suggestions / Stamps: Filename (without file extension)
« Last post by nightslayer23 on May 18, 2021, 02:30:55 AM »
What would be the code to add the filename as an option in your stamping tool but exclude the ".pdf"
75
General / Re: Delete pages marked by keyword
« Last post by Nick Riviera on May 10, 2021, 07:05:40 AM »
Works, thanks!


Try with this mixed Acrobat and PDF-ShellTools script.
Code: [Select]
var app = pdfe.CreateObject("AcroExch.App");
var baseDoc = pdfe.CreateObject("AcroExch.PDDoc");
[/quote]
76
General / Re: Delete pages marked by keyword
« Last post by RTT on May 07, 2021, 04:51:11 PM »
Try with this mixed Acrobat and PDF-ShellTools script.
Code: [Select]
var app = pdfe.CreateObject("AcroExch.App");
var baseDoc = pdfe.CreateObject("AcroExch.PDDoc");

var ProgressBar = pdfe.ProgressBar;
ProgressBar.max = pdfe.SelectedFiles.Count;

for (var i = 0; i < pdfe.SelectedFiles.Count; i++) {
    try {
        ProgressBar.position = i + 1;
        var FileObj = pdfe.SelectedFiles(i);
        var FullPathFilename = FileObj.Filename;
        FileObj.Close();

        pdfe.echo('Deleting keyword marked pages: ' + FullPathFilename);

        baseDoc.Open(FullPathFilename);

        try {
            var JSObject = baseDoc.getJSObject();
            var PagesGotDeleted = false;
            for (var p = JSObject.numPages - 1; p >= 0; p--) {
                var PageNumWords = JSObject.getPageNumWords(p);
                for (var n = 0; n < PageNumWords; n++) {
                    if (JSObject.getPageNthWord(p, n) == "DELETE") {
                        JSObject.DeletePages(p);
                        PagesGotDeleted = true;
                        break;
                    }
                }
            }
            if (PagesGotDeleted) {
                if (baseDoc.Save(0, FullPathFilename)) {
                    pdfe.echo(" [OK]", 0, 1);
                } else {
                    pdfe.echo(" [failed to save]", 0xFF0000, 1);
                }
            } else {
                pdfe.echo(" [Keyword not found]", 0xFF, 1);
            }
        } catch (err) {
            pdfe.echo(err, 0xFF0000);
            pdfe.echo("");
        }
        baseDoc.Close();
    } catch (err) {
        pdfe.echo(err, 0xFF0000);
        pdfe.echo("");
    }
}
app.Exit();
pdfe.echo('\nDone');
Use the manager to import the attached script. You will get a "Delete pages marked by keyword [DELETE]" named script in the PDF-ShellTools context menu, My Scripts submenu.
77
General / Delete pages marked by keyword
« Last post by Nick Riviera on May 05, 2021, 10:27:06 AM »
I have a  acrobat script that I use through document javascript/pdfshell tools
The script works but the pdfs is not save, otherwise I have to open each pdf and save...
I want to run this script on multiple files and then save it automatically
Can be done this ?

acrobat javascript

Quote
var Count1 = this.numPages;


for (var p=this.numPages-1; p>=0; p--) {
    for (var n=0; n<this.getPageNumWords(p); n++) {
        if (getPageNthWord(p, n) == "DELETE") {
            this.deletePages(p);
            break;
           
            app.execMenuItem("Save");
        }
    }
}
78
General / Re: trim + bleed size
« Last post by RTT on May 05, 2021, 01:50:06 AM »
From the renamer tool scripts editor, import the attached script or manually create a new script, name it BleedSize and paste the next code into the script content.
Code: [Select]
function BleedSize() {
    var Size = '';
    var Page = BatchFile.Pages(0);
    if (Page) {
        var TrimBox = Page.TrimBox ? Page.TrimBox : Page.CropBox ? Page.CropBox : Page.MediaBox;
        var BleedBox = Page.BleedBox ? Page.BleedBox : Page.CropBox ? Page.CropBox : Page.MediaBox;
        Size = GetDist_mm(BleedBox.top, TrimBox.top).toFixed() + ' mm';
    }
    BatchFile.close();
    return Size;
}

function GetDist_mm(x1, x2) {
    return Math.abs(x1 - x2) * 25.4 / 72
}

Rename expression:
[F]_[TS] + [BleedSize] bleed

 
79
General / Re: trim + bleed size
« Last post by Nick Riviera on May 04, 2021, 07:27:10 AM »
I suppose the bleed size you want to know is the difference between the trim and bleed boxes?

that's exactly  I want
I work only on pdf documents whit bleed equal for all sides,
so I  need the bleed size  for only one side

I think.. something like that (bleedbox - trimbox) / 2"


Thanks for help!
80
General / Re: trim + bleed size
« Last post by RTT on April 30, 2021, 04:22:14 AM »
The bleed box, as all the other page boundary boxes in PDF (crop, trim, etc) is a rectangle defined by 4 corners coordinates. I suppose the bleed size you want to know is the difference between the trim and bleed boxes? Because these are rectangles, it may result in 4 different values, i.e. left, top, right and bottom bleed sizes. Do you want all the 4, just the maximum, or this is just a scenario not happening with your PDFs?
Pages: 1 ... 6 7 [8] 9 10