Recent Posts

Pages: 1 2 3 [4] 5 6 ... 10
31
Ideas/Suggestions / Re: Stamps: Filename (without file extension)
« Last post by nightslayer23 on October 07, 2022, 07:53:21 AM »
How can we add more font choices to the list?
32
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by Nick Riviera on August 22, 2022, 08:36:52 AM »
Thank you.

works with this version ImageMagick-7.1.0-8-Q16-HDRI-x86-dll.exe


It seems the ActiveX ImageMagickObject is not included anymore in the installer (Windows Installer option ImageMagickObject is missing).
Get the old version installer, that includes it, from the Wayback Machine website. Don't forget to select the "Install ImageMagickObject OLE Control for VBScript,..." when installing it.
33
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by RTT on August 19, 2022, 02:47:44 AM »
It seems the ActiveX ImageMagickObject is not included anymore in the installer (Windows Installer option ImageMagickObject is missing).
Get the old version installer, that includes it, from the Wayback Machine website. Don't forget to select the "Install ImageMagickObject OLE Control for VBScript,..." when installing it.
34
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by Nick Riviera on August 18, 2022, 07:53:07 AM »
hello,
I also tried this script but  is not working or did I do something wrong. It gives me this "Error (11,0): Automation server can't create object"
I installed this version "ImageMagick-7.1.0-46-Q16-x86-dll" because there is no other older version and this version of https://www.ghostscript.com/releases/gsdnld.html
Thank you

That's functionality not directly available from the scripts API but we can create a script to automate the ImageMagick tool and get that info.
The idea is to render each PDF page and analyze the result bitmaps for color content.

Made some test and here is a sample script that creates a .csv file with a "Color Pages Count" and "BW/Gray Page Count" columns. It renders each PDF page, converts the result bitmaps to the HSI colorspace and computes the mean value of the saturation channel. The page is considered colorized if this value is higher than 0, or BW/Gray otherwise. You may adjust this threshold to your needs.


To test it, just import the attached .myscript file into the PDF-ShellTools My Scripts, and you will get a "Number of Color and BW/Gray pages" named script, you can invoke for all the selected PDF files from the Windows shell PDF files context menu, from the PDF-ShellTools>My Scripts sub menu.
The scrip needs to have the 32-bit version of the ImageMagick tool installed. I've tested with the ImageMagick-7.0.5-5-Q16-x86-dll.exe one. While installing, make sure you select the "Install ImageMagickObject OLE Control for VBScript,..." option, under the "additional tasks" page of the installer.
The ImageMagick also needs to have the Ghostscript tool installed, to handle the PDF format.

If the script is performing as needed we can change it to put the info into custom metadata properties, as you suggested.
35
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.
36
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.
37
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.
38
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.
39
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.
40
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");
Pages: 1 2 3 [4] 5 6 ... 10