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
 Saving to PDF larger in v8?

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
xequte Posted - Jul 22 2019 : 21:47:56
If you are seeing larger PDF files created in v8 than your v7 code, then ensure that your source images do not contain an alpha channel.

Support for Alpha channels in PDF was added in v8 and this will enlarge PDF documents.

Example code from user:

procedure TForm1.Button1Click(Sender: TObject);
var
  MyImage : TImageEnView;
  FileName : string;
  Is24RGB : boolean;
  I: Integer;
begin
  FileName := 'D:\Save.PDF';

  if FileExists(FileName) then
    DeleteFile(PChar(FileName));

  MyImage := TImageEnView.Create(nil);
  MyImage.LegacyBitmap := False;
  try
    MyImage.IO.CreatePDFFile(FileName);
    try
      for I := 0 to Listbox1.Items.Count - 1 do
      begin
        MyImage.IO.LoadFromFileTIFF(Listbox1.Items[i]);

        MyImage.IO.Params.PDF_PaperWidth  := MyImage.IEBitmap.Width;
        MyImage.IO.Params.PDF_PaperHeight := MyImage.IEBitmap.Height;

        if chkForceMono.checked then
        begin
          MyImage.Proc.ConvertToBWThreshold(-1);
          MyImage.RemoveAlphaChannel();
        end;

        Is24RGB := MyImage.IEBitmap.PixelFormat = ie24RGB;

        if Is24RGB then
          MyImage.IO.Params.PDF_Compression := ioPDF_JPEG
        else
          MyImage.IO.Params.PDF_Compression := ioPDF_G4FAX;

        MyImage.IO.SaveToPDF;
      end;

    finally
      MyImage.IO.ClosePDFFile;
    end;
  finally
    MyImage.Free;
  end;
end;


Nigel
Xequte Software
www.imageen.com