Print Page | Close Window

PDF preflight

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=694
Printed Date: 16 Apr 26 at 1:32AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: PDF preflight
Posted By: deus
Subject: PDF preflight
Date Posted: 29 Mar 07 at 5:48AM
Hi All ,
 
Im using iSED library for color space detection of the PDF's. In other words i want to make a "simple" logic that will decide whatever the pdf is in color or black/white. I don't know how to achive this? I doubt if iSED library is able to extract that info from the pdf correct me if im wrong.
 
 
Thanks in advance
Deus
 



Replies:
Posted By: Ingo
Date Posted: 29 Mar 07 at 8:48AM
Hi Deus!

You're right. That's not possible with QuickPDF. But ...
To get the color schemes you can use this (Delphi):
Edit1.Text contains the filename...

   var textcomplete : String;
       fs : TFileStream;
// . . .

   FileSetAttr(Trim(Edit1.Text), faArchive);

// . . .

   textcomplete := '';
   fs := TFileStream.Create(Edit1.Text,fmOpenRead+fmShareDenyWrite);
   try
     SetLength(textcomplete,fs.Size);
     fs.Read(PChar(textcomplete)^,fs.Size);
   finally
     fs.Free;
   end;

// . . .

   If Pos('/Device', textcomplete) > 0 Then
      begin
         cscheme.Text := System.Copy(textcomplete, Pos('/Device', textcomplete) + 7, 4);
         cscheme.Text := Trim(cscheme.text);
      end
     else
      cscheme.Text := 'Nothing';





Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk