Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Bug reports / Re: File MetaData not populating in ScanGrid or infoEdit Window
« Last post by RTT on July 26, 2022, 04:07:36 PM »
Is the file modified date attribute changed with the JavaScript batch process? PDFE will only rescan it if this attribute changes, or the file is new in the directory. If indeed it changes, please share (attach to a reply), a PDF that fails to get rescanned, but scans OK when manually re-saved with Acrobat.
72
Bug reports / File MetaData not populating in ScanGrid or infoEdit Window
« Last post by puckman on July 26, 2022, 02:31:17 PM »
I batch process using JavaScript within Acrobat to parse document text into my own metadata structure.  I trigger PDFE to rescan the target folder and the metadata is displayed in ScanGrid and the infoEdit window.

Recently, this behaviour has changed.  After batch-processing, PDFE does not display the metadata in either window after a rescan. Inspecting each processed document through CTRL-D, I can see the added metadata in each document property field.  I can only make the metadata appear PDFE if I use Acrobat to manually reopen and re-save the document which triggers to PDFE a file is 'dirtied' and the rescan icon appears.  This is tedious for hundreds of files and I have thousands of remaining documents to process.

I cannot recall any changes I made to PDFE settings.
73
General / Re: Filtering on a metadata field of the date type
« Last post by RTT on June 18, 2022, 03:52:27 PM »
Right now the search is text only based, so there is no way to make it more granular than specifying a full date.
74
General / Filtering on a metadata field of the date type
« Last post by puckman on June 17, 2022, 03:29:29 AM »
In the search/filter window, what parameters need to be entered to filter on a particular month, year, or date for a custom field that is of the date type.  Does it require date specific methods?

I tried a string method such as '1/' but this returns all records with the month of January, the first day of the month and years beginning with 1 as in 1998, 1999...etc

Just wondering if filtering can be more granular than the results I received.
75
General / Re: Displaying PDF Page Size in Windows Explorer
« Last post by RTT on April 29, 2022, 03:38:22 PM »
Check reply 5, at this trim + bleed size topic started by you.
76
General / Re: Displaying PDF Page Size in Windows Explorer
« Last post by Nick Riviera on April 29, 2022, 07:15:40 AM »
Hello,
I work with pdfs that contains internal measurements (cropbox, trimbox..)
Can you make a script that show the  trim  and bleed box size in Windows Explorer ?
eg. 215.9 x 279.4mm+5mm
Thank you very much.

Code: [Select]
var ProgressBar = pdfe.ProgressBar;
ProgressBar.max = pdfe.SelectedFiles.Count;

for (var i = 0; i < pdfe.SelectedFiles.Count; i++) {
    ProgressBar.position = i + 1;
    var file = pdfe.SelectedFiles(i);
    var Page = file.Pages(0);
    if (Page) {
        var w = Math.min(Page.Width, Page.Height);
        var h = Math.max(Page.Width, Page.Height);
        var PSizeStr = w.toFixed() + 'x' + h.toFixed();
        var FileMetadata = file.Metadata;
        if (FileMetadata.PageSize !== PSizeStr) {
            FileMetadata.PageSize = PSizeStr;
            if (FileMetadata.CommitChanges()) {
                pdfe.echo(file.Filename + ' : (' + PSizeStr + ') [OK]');

            } else {
                pdfe.echo(file.Filename + ' [commit changes failed]', 0xFF0000);
            }
        } else {
            pdfe.echo(file.Filename + ' : (' + PSizeStr + ') [already set]');
        }
    }
}
pdfe.echo("Done");
77
General / Re: Javascript and deleting namespaces/custom fields
« Last post by RTT on December 27, 2021, 07:01:03 PM »
You indeed will need to manipulate the Extensible Metadata Platform (XMP) data you get from the doc.metadata property. Acrobat JavaScript supports ECMAScript for XML (E4X), so it's not that difficult. There is also the Adobe XMP toolkit (there are ports for scripting languages), to manipulate the XMP data easily.

But, for that need in particular, you can use PDF Explorer to export to a csv file the metadata properties you want to keep, run the Anonymize tool and then import the exported properties back to the PDF file.
78
Ideas/Suggestions / Re: Filtering on Fields
« Last post by RTT on December 27, 2021, 06:32:40 PM »
OK
79
Ideas/Suggestions / Re: Comments Flattener
« Last post by RTT on December 27, 2021, 06:31:23 PM »
is this also possible for tapping into Acrobat's preflight options?
Preflight > "Discard hidden layer content and flatten visible layers"
Sure, but you will need to create a custom preflight profile to include that fixup. It seems only profiles can be executed from Acrobat javascript.
Create a new preflight profile, give it that "Discard hidden layer content and flatten visible layers" name (so the next script can find it) and add that fixup to it.
You can use the next PDF-ShellTools script to run it.
Code: [Select]
var oPreflight;
var app = pdfe.CreateObject("AcroExch.App");
var baseDoc = pdfe.CreateObject("AcroExch.PDDoc");
if (baseDoc.create()) {
    var JSObject = baseDoc.getJSObject();
    if (JSObject) {
        JSObject.addScript("getPreflightObj", "function getPreflightObj(){return Preflight}");
        oPreflight = JSObject.getPreflightObj();
        JSObject.removeScript('getPreflightObj');
        if (oPreflight != undefined) {
            pdfe.echo('Loading preflight profile');
            oProfile = oPreflight.getProfileByName('Discard hidden layer content and flatten visible layers');
            if (oProfile) {
                pdfe.echo(" [OK]", 0, 1);
            } else {
                pdfe.echo(" [not found]", 0xFF0000, 1);
            }
        }
    }
    baseDoc.Close();
}
if (oProfile) {
    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('Processing: ' + FullPathFilename);
            baseDoc.Open(FullPathFilename);
            try {
                var JSObject = baseDoc.getJSObject();
                if (JSObject) {
                    var PreflightResult = JSObject.preflight(oProfile);
                    if (PreflightResult.numFixed > 0) {
                        baseDoc.Save(1, FullPathFilename);
                        pdfe.echo(" [OK]", 0, 1);
                    } else {
                        pdfe.echo(" [fixup(s) not applied]", 0, 1);
                    }
                }
            } catch (err) {
                pdfe.echo(FullPathFilename + ': ' + err, 0xFF0000, 2);
                pdfe.echo(' ');
            }
            baseDoc.Close();
        } catch (err) {
            pdfe.echo(err, 0xFF0000);
            pdfe.echo(' ');
        }
    }
}
app.Exit();
pdfe.echo('Done');
80
General / Javascript and deleting namespaces/custom fields
« Last post by puckman on December 26, 2021, 04:03:03 PM »
I use Adobe's action scripts (javascript)  to automate populating custom fields.  I have hundreds of documents with custom fields that are 'orphaned.'  What I mean by this is that the document's namespace assigned to a custom field is no longer corresponds to the current namespaces in PDFE.

Instead of opening each file and manually deleting each entry under the Custom tab in Document Properties, I would like to create an action script that will batch process such files.  However, in my own research and  inquiries in user groups as well as trial and error , I am lead to believe that there is not a Javascript Adobe API method that can do this.

I'm not even sure I understand the object model for these custom fields other than its based on XML.  Looking at XML programming, that seems like an added learning curve.

Does know anyone know of an Adobe API method that can iterate through the custom fields and remove them?

Cheers

Pages: 1 ... 6 7 [8] 9 10