Recent Posts

Pages: 1 ... 6 7 [8] 9 10
71
Ideas/Suggestions / Where to download / receive purchase product...from Avangate?
« Last post by Harris121 on July 25, 2017, 06:41:35 AM »
Just purchased RTT Software - PDF ShellTools....

Where's the download link to the software?????

Very frustrating..plz assist....so far, no email, etc..from vendor.

Successful purchases should be instantaneous....!

NO REFERENCE NUMBER INDICATED IN EMAIL!
NO LINK TO DOWNLOAD SOFTWARE?!
NO EMAIL FROM RTT SOFTWARE TO DOWNLOAD???!!!

Thx...
72
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by RTT on July 20, 2017, 12:01:52 AM »
Did you tested with the -dPrinted parameter I suggested in my previous reply?

You can easily verify if indeed the hidden layers are being erroneously rendered. From a command prompt, run (change the file paths to your system specifics):
"C:\Program Files (x86)\ImageMagick-7.0.5-Q16\magick.exe" convert "Path\To\The\PDF.pdf" "Path\Where\To\Put\The\Page\Renders\Image.png"

You can also check what image is being generated in the script, to quantify the ink utilization:
"C:\Program Files (x86)\ImageMagick-7.0.5-Q16\magick.exe" convert "Path\To\The\PDF.pdf" -colorspace gray -auto-level -threshold 99% "Path\Where\To\Put\The\Page\Renders\Image.png"
73
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by nightslayer23 on July 19, 2017, 08:16:14 AM »
Is there a way for the file to be flattened first before doing this conversion? Some work perfectly, but others come out at a really high percentage when they aren't technically going to print that way. I figured it was looking at other layers or some other hidden info and converting that to bw too.
Are these trouble PDF layers set to be visible in the PDF reader (screen mode) and hidden when printed? If that's the case, edit the file delegates.xml, where you have ImageMagick installed, and change the line "<delegate decode="ps:alpha" stealth="True" command="&quot;@PSDelegate@&quot; -q -dQUIET -..." to include the -dPrinted parameter.

Quote
So would i be possible in code to first flatten layers before running the check?
When the ImageMagick tool calls the Ghostscript to convert each of the PDF pages to an image, that then uses to run the color check, is effectively flattening the PDF. If the issue is not the mentioned above (these layers are set to be hidden only when the PDF is printed) and even hidden layers are being rendered too, then that's an issue with Ghostscript.
If you have Acrobat, I suppose the script can automate it to flatten the PDF layers to a temporary PDF file and then run the check on that PDF.

Quote
I actually batch flattened layers in acrobat and it didn't solve the issue.. I had to batch flatten AND convert everything to CMYK to get it to work.
Can't opine without a sample file.

Quote
In the optimizer tool, can CMYK and RGB colour spaces be added somehow?
I'm not understanding your question. Please explain this better.

They view hidden as well. but I'm assuming that's why they come out saying an extremely high percentage.. because once I render the file, goes from saying 75% & 99% to 12% and 22% for example - which is how they view as well.
74
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by RTT on July 19, 2017, 03:56:14 AM »
Is there a way for the file to be flattened first before doing this conversion? Some work perfectly, but others come out at a really high percentage when they aren't technically going to print that way. I figured it was looking at other layers or some other hidden info and converting that to bw too.
Are these trouble PDF layers set to be visible in the PDF reader (screen mode) and hidden when printed? If that's the case, edit the file delegates.xml, where you have ImageMagick installed, and change the line "<delegate decode="ps:alpha" stealth="True" command="&quot;@PSDelegate@&quot; -q -dQUIET -..." to include the -dPrinted parameter.

Quote
So would i be possible in code to first flatten layers before running the check?
When the ImageMagick tool calls the Ghostscript to convert each of the PDF pages to an image, that then uses to run the color check, is effectively flattening the PDF. If the issue is not the mentioned above (these layers are set to be hidden only when the PDF is printed) and even hidden layers are being rendered too, then that's an issue with Ghostscript.
If you have Acrobat, I suppose the script can automate it to flatten the PDF layers to a temporary PDF file and then run the check on that PDF.

Quote
I actually batch flattened layers in acrobat and it didn't solve the issue.. I had to batch flatten AND convert everything to CMYK to get it to work.
Can't opine without a sample file.

Quote
In the optimizer tool, can CMYK and RGB colour spaces be added somehow?
I'm not understanding your question. Please explain this better.
75
Ideas/Suggestions / Re: Script to count how many colour pages in PDF?
« Last post by nightslayer23 on July 19, 2017, 12:29:43 AM »
whatever ISN'T white space..
Not easy to find a ImageMagick set of commands to calculate this properly for all the situations, even because I'm not an expert on this subject, but thresholding the image, to convert to black all non-white pixels, and then calculating the page percentage of black pixels seems to be giving good results.
Code: [Select]
var imo = new ActiveXObject("ImageMagickObject.MagickImage.1");
var fso = new ActiveXObject("Scripting.FileSystemObject");

var tmpfolder = fso.GetSpecialFolder(2 /*TemporaryFolder*/ );
var InfoFilename = tmpfolder + '\\PagesInfo.txt';

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 FileMetadata = file.Metadata;

    //Bypass already processed files.
    if (FileMetadata.InkCoverage) {
        pdfe.echo(file.filename + ': Ink coverage = ' + FileMetadata.InkCoverage);
        pdfe.echo(' [Already set]', 0xFF, 1);
        continue;
    }

    pdfe.echo('Processing ' + file.filename + ' (' + file.NumPages + ' pages)');
    try {
        //use imagemagick to render each pdf page, convert all non-white colors to black
        //and calculate the average of black pixels, that correspond to the percentage of non-white area.

        //imo.convert(file.filename, "-fuzz","1%","-fill","white","opaque","white","-fill","black","+opaque","white","-format", "%[fx:100-mean*100]\n", "info:" + InfoFilename);               
        imo.convert(file.filename, "-colorspace", "gray", "-auto-level", "-threshold", "99%", "-format", "%[fx:100-mean*100]\n", "info:" + InfoFilename);

        //read the result info file, that contains a line of ink coverage percentage value for each page.
        var f = fso.GetFile(InfoFilename);
        var fts = f.OpenAsTextStream();
        var PagesInkCoverage = fts.ReadAll().split('\n');
        fts.Close();
        f.Delete();

        //calculate the document total ink coverage by averaging the by page values.
        var InkCoverage = 0;
        for (var index = 0, len = PagesInkCoverage.length - 1; index < len; index++) {
            InkCoverage += Number(PagesInkCoverage[index]);
        }
        InkCoverage = Math.round((InkCoverage / (len ? len : 1)));

        pdfe.echo(file.filename + ': Ink coverage=' + InkCoverage + '%', 0, 2);

        if (FileMetadata.InkCoverage !== InkCoverage.toString()) {
            FileMetadata.InkCoverage = InkCoverage;
            if (FileMetadata.CommitChanges()) {
                pdfe.echo(' [OK]', 0x006400, 1);
            } else {
                pdfe.echo(' [Setting metadata failed]', 0xFF0000, 1);
            }
        } else {
            pdfe.echo(' [Already set]', 0xFF, 1);
        }

    } catch (e) {
        pdfe.echo(file.filename + ' : ', 0, 2);
        pdfe.echo(e.name + ' ( ' + e.message + ' )', 0xff0000, 1);
    }
}

pdfe.echo('Done');
This script expects a custom property named InkCoverage and to show in the Shell this ink coverage percentage value as ranges named "Line", "Medium" or "High", this custom property needs to be configured as depicted in the attached screenshots.

If it's not giving the expected results, better if you ask in a ImageMagick forum on how to calculate this and then we can update the script with a better set of image processing/analysis commands.


Is there a way for the file to be flattened first before doing this conversion? Some work perfectly, but others come out at a really high percentage when they aren't technically going to print that way. I figured it was looking at other layers or some other hidden info and converting that to bw too.

I did a test saving one to jpg, converting it back to pdf then running the tool again which gave me an accurate result. However the process to convert one to jpg and back to pdf was quite slow. I am needing to colm over hundreds of files at once with this tool to get a fast result. So would i be possible in code to first flatten layers before running the check?

I actually batch flattened layers in acrobat and it didn't solve the issue.. I had to batch flatten AND convert everything to CMYK to get it to work.

In the optimizer tool, can CMYK and RGB colour spaces be added somehow? Because Acrobat is just way too slow at doing these steps.. your tool is much faster!
76
Ideas/Suggestions / Re: Remove illegal charters from file names
« Last post by Spinnaker on July 14, 2017, 09:23:24 AM »
Happy to beta test  ;)
77
Ideas/Suggestions / Re: Remove illegal charters from file names
« Last post by RTT on July 14, 2017, 01:15:40 AM »
Good idea! I've just finished to add code that, if pasting to the filename field, removes these invalid characters from the capture assisted text.

I'm also adding the possibility to execute text format scripts, triggered from the assistant extra format functions button, to extend the current "capitalize, "lowercase" and "uppercase" only possibilities.
78
Ideas/Suggestions / Remove illegal charters from file names
« Last post by Spinnaker on July 13, 2017, 12:20:19 PM »
The Metadata capture wizard is a great help, however, the selected text may contain reserved characters that cannot be used in file name.

It would be really helpful if there was an option to remove these characters or have a user option to substitute, e.g. with a "-" or a "_".

List of reserved characters:
Code: [Select]
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
79
Ideas/Suggestions / Re: 6 great new features!
« Last post by RTT on June 28, 2017, 02:30:42 AM »
Quote
3) Convert text to image PDF ( curve fonts)
Not a very good practice, and only useful for very specific scenarios needed by users that already have access to tools that can do this.
This function is used quite often, for example, to reduce the size of text- based pdf file. It is implemented in the Actomat program, http://apps.kuczynski.pl
it works automatically when binarizing pdf. Used Leptonica library http://www.leptonica.com
That program only converts all the source files to black and white images (for PDFs, it renders each PDF to a image first) and then creates a PDF with these images. It's like a fax2pdf, without OCR, converter. No such advanced text to outlines (curves) functionality available.
And converting text to outlines usually increases the data size, so it's not a solution to reduce the file size.

Quote
Quote
6) Send the  pdf file to the program-compressor
These compressors do not support the command line:( but PDF-ShellTools script will help fix it))
If there is no command line, nor COM automation, how do you command these tools from a script?
I'm not an expert, but can not I make a script:
1) In the context menu of the pdf file(s), open the line PDF Shelltools "Compress with..." (Specific settings are filled in by the user himself)
2)Starting the compressor program
3)Automatically transfer of the file(s) icon to the compressor program window.
Then you can manually select the compression mode and start
This will be similar to "Send to" command, if the program-compressor supported the command line
For such a simple task, i.e. to provide a shell context menu to run that external program with the selected files, and if that application installer doesn't do that for you, or you want to provide your custom command line parameters, just create a My Tool to easily add it to the shell context menu. Check attached screenshot for details.

Or you may manually register a custom static verb.
80
Ideas/Suggestions / Re: Pdfshelltools - print function
« Last post by AHN on June 28, 2017, 12:22:24 AM »
You are right. Tabs appear now. Next step ..I will try. Have a nice day.Thanks.
Pages: 1 ... 6 7 [8] 9 10