Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - transparent jpeg images
  FAQ FAQ  Forum Search   Register Register  Login Login

transparent jpeg images

 Post Reply Post Reply
Author
Message
divo View Drop Down
Beginner
Beginner


Joined: 18 Aug 09
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote divo Quote  Post ReplyReply Direct Link To This Post Topic: transparent jpeg images
    Posted: 11 Nov 09 at 3:56PM
Hi there,

I have a problem with grayscale jpeg images. If I add a grayscale jpeg and set an image mask for transparency no error is thrown, but if your view the pdf via Acroread 9.2 it informs you about an error on the page.

Below is a small program that reproduces the behaviour. (I'm using Delphi2009) At the end of this post is a base64 encoded 1x1-px jpeg that one can use.

Is this a bug in the library or am I doing something wrong here?


program error;

{$APPTYPE CONSOLE}

uses
  SysUtils,
  QuickPDF0717;

var
  QP: TQuickPDF0717;
  retval: Integer;

begin
  try
    QP:= TQuickPDF0717.Create;
    if QP.UnlockKey(YOUR KEY HERE) = 0 then raise Exception.Create('UnlockKey');
    if QP.NewDocument = 0 then raise Exception.Create('NewDocument');
    if QP.AddImageFromFile('error.jpg', 0) = 0 then raise Exception.Create('AddImageFromFile');
    if QP.SetImageMask(0.9, 0.9, 0.9, 1, 1, 1) = 0 then raise Exception.Create('SetImageMask');
    if QP.DrawScaledImage(0, QP.ImageHeight, 0.5) = 0 then raise Exception.Create('DrawImage');
    if QP.SaveToFile('dummy.pdf') = 0 then raise Exception.Create('SaveToFile');

  except
    on E:Exception do begin
      Writeln(E.Classname, ': ', E.Message);
      Readln;
    end;
  end;
end.



/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEP
ERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/wAALCAABAAEBAREA/8QAFAABAAAAAAAA
AAAAAAAAAAAACP/EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAD8AZb//2Q==

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store