ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Convert a PDF to TIFF

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
michaeldca Posted - Dec 06 2016 : 13:15:26
Good afternoon! I need to do the conversion of a PDF file into TIFF, know the color used and break this file into several pages.

Which of the components do I use to do this?

Hugs.

Michael
6   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Dec 19 2016 : 12:55:55
See the new WPCubed Plugin Demo for details on how to load PDF file, change image colors and export to tiff file:
http://www.imageen.com/ieforum/topic.asp?whichpage=6&TOPIC_ID=1446#10655

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
xequte Posted - Dec 18 2016 : 19:11:10

MBitmap := TIEMultiBitmap.create;
MBitmap.Read( 'D:\myPDF.pdf' );
MBitmap.Write( 'D:\myTIFF.tiff' );
MBitmap.Free();


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
michaeldca Posted - Dec 13 2016 : 14:51:17
Thank you! Now, how can I convert PDF to TIFF and do these checks?
w2m Posted - Dec 13 2016 : 09:46:02
There are no built-in functions to achieve this so we will build our own function.
type
  TIEColorType = (ieGrayScale, // grayscale
    ieBlackWhite, // black and white
    ieColor, // colored
    ieUnknown);

function GetColorType(AIEBitmap: TIEBitmap): TIEColorType;
begin
  if AIEBitmap.Bitcount = 1 then
    Result := ieBlackWhite
  else if AIEBitmap.IsGrayScale then
    Result := ieGrayScale
  else if AIEBitmap.PaletteUsed > 2 then
    Result := ieColor
  else
    Result := ieUnknown;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  if OpenPictureDialog1.Execute then
  begin
    ImageEnView1.IO.LoadFromFile(OpenPictureDialog1.FileName);
    ImageEnView1.Update;
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  ImageEnView1.Proc.ConvertToGray;
  ImageEnView1.Update;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  ImageEnView1.Proc.ConvertToBWOrdered;
  ImageEnView1.IEBitmap.Bitcount := 1;
  ImageEnView1.Update;
end;

procedure TForm1.Button4Click(Sender: TObject);
var
  ieColorType: TIEColorType;
  iColor: string;
begin
  ieColorType := GetColorType(ImageEnView1.IEBitmap);
  case ieColorType of
    ieGrayScale:
      iColor := 'grayscale.';
    ieBlackWhite:
      iColor := 'black and white.';
    ieColor:
      iColor := 'colored.'
  end;
  MessageBox(0, PChar('The bitmap is ' + iColor), 'Color',
    MB_ICONINFORMATION or MB_OK);
end;

This is only one way to achieve this so other options may work as well.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
michaeldca Posted - Dec 12 2016 : 13:29:16
Actually, that's not quite what I wanted. I think I expressed myself poorly.

I need to know the size and color of a TIFF, whether it is colored, grayscale or black and white.

Then convert it to PDF.
xequte Posted - Dec 06 2016 : 15:20:55
Hi Michael

To read the PDF you will need to use ImageMagick+GhostScript or the new WPViewPDF plug-in:

http://www.imageen.com/ieforum/topic.asp?TOPIC_ID=2744


Other than that, everything you need is built into ImageEn.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com