Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
KUMARARAJA@adobeforums.com #1
Color Conversion for all Elements
Hi,
I am writing some plug in which can convert Color of the PDF for that i have used "PDDocColorConvertPage" it is perfectly working well for Grayscale Conversion, But the same method is not working for the Pantone (SpotColor) to CMYK conversion, so i tried with PDColorConvertPDEElement but i don't get the proper sample to use that function. I was blocked, please help me out to find the best method for color conversion problem.
Regards,
Kumar.K
KUMARARAJA@adobeforums.com Guest
-
Process to Spot Color Conversion
Is there any way to find the approximate equivalent spot colour for a Pantone process colour? I want to find a spot colour similar to Pantone DS... -
Wholesale conversion of color palette
I'm evaluating Adobe Illustrator and like most of what I have seen. The methods of getting there, however, are a little different than my mindset.... -
Color Conversion
I am trying to convert Word documents containing some colored texts to pdf in gray scale only. I am working with Win 2000 and Office XP with Acrobat... -
Set Color to Elements in my control
I am trying to set HTML elements in my server control to the ForeColor setting for the control. For example I create a server control which I inherit... -
Converting a color negative .jpg to a color positive image .jpg in Photoshop Elements 2.0
My scanner will convert color photo negatives to a positive image which I can then adjust using Photoshop Elements. However, it is much faster to... -
Leonard_Rosenthol@adobeforums.com #2
Re: Color Conversion for all Elements
What do you mean it is "not working"? Please explain.
also, what version of Acrobat are you using?
Leonard_Rosenthol@adobeforums.com Guest
-
KUMARARAJA@adobeforums.com #3
Re: Color Conversion for all Elements
I am using Acrobat 9, Here i am giving the code which working now, in that my objective is to change all the elements to Grayscale, but i am sure that i did some mistakes, Please let me know where i made the mistake
Code:
-----
AVDoc avDoc = AVAppGetActiveDoc();
char str[256];
ASPathName aoPDFPathName = NULL;
char* OutputPdfFileName = "C:\\Output.pdf";
ASText pathText = ASTextNew();
ASFileSys aoFileSys = NULL;
pathText = ASTextFromScriptText(OutputPdfFileName, kASRomanScript);
aoFileSys = ASGetDefaultFileSysForPath(ASAtomFromString("ASTex tPath"), pathText);
if(avDoc==NULL)
{
sprintf(str,"There is no PDF document loaded in Acrobat.");
}
else
{
PDDoc pdDoc = AVDocGetPDDoc (avDoc);
int numPages = PDDocGetNumPages (pdDoc);
ASInt32 ai, aiNumElems;
PDEContent aoPDEContent = NULL;
PDEElement aoPDEElement;
PDPage aoPage = NULL;
aoPage = PDDocAcquirePage(pdDoc, 0);
aoPDEContent = PDPageAcquirePDEContent(aoPage, 0);
aiNumElems = PDEContentGetNumElems(aoPDEContent);
sprintf(str,"The active PDF Page has %d Elements.", aiNumElems);
AC_Profile prof;
ACProfileFromCode(&prof, AC_Profile_DotGain15);
for (ai = 0; ai < aiNumElems; ai++) { aoPDEElement = PDEContentGetElem(aoPDEContent, ai); PDColorConvertPDEElement(pdDoc, aoPDEElement, prof, AC_UseProfileIntent, true); } if (aoPDEContent != NULL){ PDPageReleasePDEContent(aoPage, 0); } // inform the user if we have done a color conversion. if(ASBoolToBool(gbConverted) == true) AVAlertNote("Color transform has been done to Gray"); else AVAlertNote("No color transform was made.");
aoPDFPathName = ASFileSysCreatePathName (aoFileSys, ASAtomFromString("ASTextPath"), pathText, 0);
PDDocSave (pdDoc, PDSaveFull | PDSaveCollectGarbage | PDSaveLinearized, aoPDFPathName, ASGetDefaultUnicodeFileSys(),NULL, NULL);
PDDocClose (pdDoc);
ACUnReferenceProfile(prof);
}
Thanks,
Kumar.K
KUMARARAJA@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #4
Re: Color Conversion for all Elements
I don't want to read your code - I want to understand why you think that it's not working for spot/pantone colors.
Leonard_Rosenthol@adobeforums.com Guest
-
KUMARARAJA@adobeforums.com #5
Re: Color Conversion for all Elements
Still Spot color is present in the Output PDF file which i am saving, Convertion is not done from Pantone to CMYK, that is why i am thinking that some thing is missing while using PDColorConvertPDEElement.
KUMARARAJA@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #6
Re: Color Conversion for all Elements
You need to set/pass the correct color conversion params
Leonard_Rosenthol@adobeforums.com Guest
-
KUMARARAJA@adobeforums.com #7
Re: Color Conversion for all Elements
I am getting This error
"There is no source code available for the current location."
while the debugging the code
"PDColorConvertPDEElement(pdDoc, aoPDEElement, prof, AC_UseProfileIntent, true);"
What is the problem?
but in the same plugin PDDocColorConvertPage function is working fine.
KUMARARAJA@adobeforums.com Guest
-
Leonard_Rosenthol@adobeforums.com #8
Re: Color Conversion for all Elements
Right - you don't have the source code to the PDFLibraries and as such you can't debug into that API call.
Leonard_Rosenthol@adobeforums.com Guest
-
KUMARARAJA@adobeforums.com #9
Re: Color Conversion for all Elements
So, PDColorConvertPDEElement is not for Acrobat SDK?
but in the Help i found
PDColorConvertPDEElement ()
Product availability: Acrobat, PDFL
Platform availability: Macintosh, Windows, UNIX
If it is not for Acrobat, then through which method i can change the color of the each elements?
Please direct me.
Thanks
KUMARARAJA@adobeforums.com Guest



Reply With Quote

