Skip navigation
Currently Being Moderated

Downsampling to 150

Feb 1, 2012 9:11 AM

Tags: #pdf #downsampling

Hello all:

 

   I've built a small plugin that creates PDFs out of InDesign documents.  I set the following export options just prior to generating the PDF (sorry about the table format--the forum editor is doing that--not me):

 

 


InterfacePtr<IPDFExportPrefs> CmdExportPrefs(PrintOnePDFCommand, UseDefaultIID());

 


CmdExportPrefs -> SetAddStructure(kFalse);      //  Tagged PDF

CmdExportPrefs -> SetIncludeSlug(  kTrue);

CmdExportPrefs -> SetUseDocumentBleed(kFalse);

 


CmdExportPrefs -> SetPDFExMarkLineWeight(  .25);

CmdExportPrefs -> SetPDFExPrinterMarksOffset(   21);//  .29 inches roughly equals 21

CmdExportPrefs -> SetPDFExSubsetFontsThreshold(100);//  100% of subsetted fonts are embedded

 


CmdExportPrefs -> SetPDFExBleedTop(          9);

CmdExportPrefs -> SetPDFExBleedBottom(       9);

 


CmdExportPrefs -> SetPDFExBleedInside(       9);

CmdExportPrefs -> SetPDFExBleedOutside(      9);

 


CmdExportPrefs -> SetPDFExAcrobatCompatibilityLevel(             IPDFExportPrefs::kPDFVersion16);

CmdExportPrefs -> SetPDFExBleed(                                IPDFExportPrefs::kExportBleedON);

 


CmdExportPrefs -> SetPDFExColorBars(                       IPDFExportPrefs::kExportColorBarsOFF);

 


CmdExportPrefs -> SetPDFExCompressColorImages(IPDFExportPrefs::kExportCompressImagesAut oLZWJPEGHigh);   //  Quality?

CmdExportPrefs -> SetPDFExCompressGrayImages( IPDFExportPrefs::kExportCompressImagesAutoLZWJPEGHigh);   //  Quality?

 


CmdExportPrefs -> SetPDFExColorSpace(             IPDFExportPrefs::kExportPDFColorSpacePassthru);

 

 


CmdExportPrefs -> SetPDFExCompressLineArtAndText(  IPDFExportPrefs::kExportCompressLineArtAndTextON);

CmdExportPrefs -> SetPDFExCompressMonoImages( IPDFExportPrefs::kExportCompressImagesCCITTGroup4);   //  Quality?

 


CmdExportPrefs -> SetPDFExCropMarks(                        IPDFExportPrefs::kExportCropMarksON);

 


CmdExportPrefs -> SetPDFExDisallowImageCrop(       IPDFExportPrefs::kExportDisallowImageCropOFF);   //  Crop image to frame

 


CmdExportPrefs -> SetPDFExIncludeICCProfiles(     IPDFExportPrefs::kExportIncludeICCProfilesOFF);

CmdExportPrefs -> SetPDFExPageInfo(                          IPDFExportPrefs::kExportPageInfoON);

 


CmdExportPrefs -> SetPDFExReaderSpreads(               IPDFExportPrefs::kExportReaderSpreadsOFF);

CmdExportPrefs -> SetPDFExRegistrationMarks(       IPDFExportPrefs::kExportRegistrationMarksOFF);

CmdExportPrefs -> SetPDFExThumbnails(                     IPDFExportPrefs::kExportThumbnailsOFF);

 


CmdExportPrefs -> SetPDFExLinearized(                     IPDFExportPrefs::kExportLinearizedOFF);

 



// process kSetPDFExportPrefsCmdBoss to change current settings


InterfacePtr<ICommand> SetPDFExportPrefsCmd(CmdUtils::CreateCommand(kSetPDFExportPrefsCmdBos s));


if (SetPDFExportPrefsCmd == nil)


{



ASSERT_FAIL("Failed to get setPDFExportPrefsCmd");



break;


}


InterfacePtr<IPDFExportPrefs> pdfExportPrefs(SetPDFExportPrefsCmd, UseDefaultIID());


if (pdfExportPrefs == nil)


{



ASSERT_FAIL("Failed to get IPDFExportPrefs/pdfExportPrefs");



break;


}


pdfExportPrefs -> CopyPrefs(CmdExportPrefs);


CmdUtils::ProcessCommand(SetPDFExportPrefsCmd);

 

With this set of options, some of our images are getting downsampled to 150 dpi when they otherwise have decent resolution.

 

I removed all the compression lines, for example:

 


CmdExportPrefs -> SetCompressColorAbove(   300);//Color:  300JPEG 

CmdExportPrefs -> SetCompressGrayAbove(    300);//Grayscale 300JPEG

CmdExportPrefs -> SetCompressMonochromeAbove( 1200);//  1 bit 1200 CCITT

 


CmdExportPrefs -> SetPDFExCompressColorImages(IPDFExportPrefs::kExportCompressImagesAut oLZWJPEGHigh);   //  Quality?

CmdExportPrefs -> SetPDFExCompressGrayImages( IPDFExportPrefs::kExportCompressImagesAutoLZWJPEGHigh);   //  Quality?

 


CmdExportPrefs -> SetPDFExCompressLineArtAndText(  IPDFExportPrefs::kExportCompressLineArtAndTextON);

CmdExportPrefs -> SetPDFExCompressMonoImages( IPDFExportPrefs::kExportCompressImagesCCITTGroup4);   //  Quality?

Suddenly all of our images were downsampled to 150 dpi.  What's making that happen?  How can I stop it?

 

TIA!

 

John

 

 

 

 

 

 

 

 

 

 

 


 
Replies
  • Currently Being Moderated
    Feb 2, 2012 9:07 PM   in reply to JADarnell

    Do you try the Image sampling options of IPDFExportPrefs?

    SetPDFExSampleColorImages, SetPDFExSampleGrayImages, SetPDFExSampleMonoImages,

    SetPDFExSampleColorImagesXRes. etc.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points