Skip to main content
doobeedoobee
Known Participant
Jul 28, 2017 3:52 AM UTC
Question

printing with javascript prints too large

I have a javascript script that prints a few PDFs. They are printing about 10% too large. If I print each one manually, they print normal size.

I am using a folder level script and using printparams to adjust the settings. I have tried setting pagehandling to "fit" and "shrink" but it is still larger than it is supposed to be.

Any suggestions?

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

doobeedoobee
Known Participant
Jul 29, 2017 5:35 AM UTC

Thanks. I'll give it a go. Interestingly, if I print from the printer tray set up for black and white, it works. It's the colour printing that is a problem

Translate
doobeedoobee
Known Participant
Jul 28, 2017 1:00 PM UTC

I've tried

        pp.pageHandling=pp.constants.handling.none;

        pp.pageHandling=pp.constants.handling.fit;

        pp.pageHandling=pp.constants.handling.shrink;

"none" is a lot bigger

"fit" and "shrink" are about 10% too big

Translate
try67
Community Expert
Community Expert
Jul 28, 2017 2:58 PM UTC

Maybe try using the tileScale property to scale down your pages... Not sure it will work, but it's the only option I can think of, short of scaling the pages themselves.

Translate
JR Boulay
Community Expert
Community Expert
Jul 28, 2017 12:18 PM UTC

I guess you should use the bShrinkToFit parameter.

Translate
Acrobate du PDF, InDesigner et Photoshopographe
doobeedoobee
Known Participant
Jul 28, 2017 10:14 AM UTC

var customSilentPrint=app.trustedFunction(

    function(oDoc)

{

    app.beginPriv();

   

    try{

        var pp=oDoc.getPrintParams();

       

        pp.interactive=pp.constants.interactionLevel.silent;

        pp.pageHandling=pp.constants.handling.none; //print actual size, not to fit or shrink

        pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;//print double sided

    }

    catch(err){

        app.alert("Error setting up printing parameters.\n\n"+err);

    }

   

    try{

        oDoc.print(pp);

    }

    catch(err){

        app.alert("Error Printing\n\n"+err);

    }

   

    app.endPriv();

   

}

);

Translate
try67
Community Expert
Community Expert
Jul 28, 2017 8:34 AM UTC

Can you post your code?

Translate