Print Page | Close Window

Adobe 7 issues

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=163
Printed Date: 04 May 24 at 10:38PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Adobe 7 issues
Posted By: CorkyC
Subject: Adobe 7 issues
Date Posted: 01 Nov 05 at 10:35PM

 In our VB Application, we used "ised.dll" along with "pdf.ocx".  If the users has Adobe 7 installed, they get an error on the PDF.ocx file.  The pdf.ocx file came with Adobe 6, and did not come with Adobe 7 professional.

So, I new question is do I need an upgraded version of pdf.ocx for Adobe 7, or some other equivalent file from Adobe 7?

Thanks for any help you can provide.

Corky Cootes

Austin, TX




Replies:
Posted By: Ingo
Date Posted: 01 Nov 05 at 10:52PM
Hi Corky!
I can remind me that i've read already something about it. The new version 7 don't use the pdf.ocx - now it's the AcroRd32.dll. How to access/use this dll is well explained/documentated on the adobe-website.
I can imagine that it's a problem when the version 7 is installed/registered and you want to use the pdf.ocx.
You can detect if version 7 is installed or not. If it's version 7 use code for the new dll - if not use your pdf.ocx.


-------------
Cheers,
Ingo



Posted By: chicks
Date Posted: 02 Nov 05 at 12:37AM

Lots of developers assumed that "pdf.ocx" was there for them to use.  In fact, Adobe never published documentation for it, and ONLY intended it to be used by browsers.

As of Reader 7, Adobe now includes a fully documented COM object that can be used to display and print PDFs.  It's documented in Adobe's IACReference.PDF.

 



Posted By: FKirch
Date Posted: 02 Nov 05 at 12:38PM
@chicks @ingo:
Both of you mention the well documented Adobe IACReference.PDF
Does anyone of you have a delphi example of how to access Adobe Reader with this COM interface?


Posted By: chicks
Date Posted: 02 Nov 05 at 3:27PM

Sorry, don't know Delphi.  This might help:

http://www.devblog.de/index.php/archives/2004/12/29/15/ - http://www.devblog.de/index.php/archives/2004/12/29/15/

This may provide additional details:

http://www.powerbasic.com/support/forums/Forum7/HTML/002532.html - http://www.powerbasic.com/support/forums/Forum7/HTML/002532.html

 



Posted By: Ingo
Date Posted: 03 Nov 05 at 2:34AM
Hi!
Is there an easy (and safe) methode to detect the local actual used reader-version? The described com-object is only for version 7 - there're still many version below 7 out there...


-------------
Cheers,
Ingo



Posted By: dsola
Date Posted: 03 Nov 05 at 7:53AM
Hi,
We are using Delphi and had the same problem.
Now we create TWebBrowser and send PDF to it.

Maybe it's slower but You have no problem with Reader versions.



-------------
registered QuickPDF user


Posted By: Ingo
Date Posted: 03 Nov 05 at 9:57AM
Hi Dsola!

Wow! Great idea... and so easy.


-------------
Cheers,
Ingo



Posted By: oldelphi
Date Posted: 03 Nov 05 at 2:29PM

If you use Twebbrowser you can also load different filetypes in the browser than PDF and HTML.

If you download DWF viewer from Autodesk you can watch DWF drawing files.

SVG files made by Adobe or exported from MS viso can be used for diagrams for customer that not have Visio.

This is some filetypes to use in TWEBBROWSER

Have a nice delphi trayout of the browser.

Remenber to load a file localy I use this code :

  WB.Navigate(WideString(loadfilepdf), Flags, Flags, Flags, Flags);

or

function file_to_html(str1 : string):string;
var str2,str3,str4,str5 : string;
i,bb : integer;
begin
bb:=length(str1);
str2:=str1[1];
str3:='|';
str4:='file:///';
str5:='';
for i:=0 to bb do
begin
if i > 2 then
str5:=str5+str1;
end;
result:=str4+str2+str3+str5;
end;

or

Wb.Navigate('D:\d\dh4\test\labels\test1.pdf');

regards

oldelphi

 

 

 

 

 



-------------
oldelphi

Best regards from Norway


Posted By: ue14
Date Posted: 07 Nov 05 at 3:40AM
@FKirch and anybody who's interested:

Some hints for those still trying to use the reader OCX with Delphi:

Registering the OCX control is pretty straight forward ... just do as with other registered OCX controls; keep in mind that the reader must be installed properly (I made the experience that - if the reader chrashes - the OCX control simply will not work. Interestingly if you start the reader again it attempts automatic repair and everything's fine again.

Use of the control from the code point of view is simple (some sample code below); Delphi (btw I'm using Delphi 5 & 6) generates the interface describing all methods and properties (AcroPDFLib_TLB.pas); you might wanna take a look at it. Just drop the control on a form and load a pdf into it. First drawback here: the control handles painting and refreshing very, very, very badly so it would be a good idea to create the control at runtime.

Some more disturbing behaviours:

After loading the control comes up with standard settings (e.g. toolbars visible, zoom 100% etc. etc.) depending on the actual reader options. Also the display mode seems to be undefined and MUST be set in order to get any preview. Consequently your code has to take care of the appearance of the OCX everytime you load a pdf into it - not so nice. This also applies if you reload the same pdf.

You will not be able to get rid of the pages, bookmarks, etc. panels on the left; at least the divider bar will always be there.

There is no good way to "close" a pdfor to remove it from the control/memory. Loading a non-existing pdf into the control works but memory is handled rather badly and the control simply does not refresh - ergo again some coding to do. Finally - at least in my testing environment - the control does not adjust to size changes of the parent control. Again this requires some extra coding.

To wrap things up: The OCX reader control work but displays some nasty behaviour. Also the reader must be installed on the target system which complicates distribution of any application. These led me to the conclusion that the OCX is fine for a testing/debugging environment but actually not advisable in a productive environment. See also the very nice article of Michel_K17 of 'Superfast rendering' in the 'General Discussion' section.

Hope this was of help - some sample code coming up now. Happy to answer questions whenever possible.

Cheers
Udo

procedure TForm1.Button1Click(Sender: TObject);
begin
//check if file is already loaded
if AcroPDF1.Src<>'C:\test.pdf' then
begin

    // hide reader toolbar and scrollbars
    // show first page in full-page mode

    AcroPDF1.Visible:=false;
    AcroPDF1.LoadFile('C:\test.pdf');
    AcroPDF1.setShowToolbar(false);
    AcroPDF1.setShowScrollbars(false);
    AcroPDF1.setLayoutMode('SinglePage');
    AcroPDF1.setPageMode('none');
    AcroPDF1.setView('Fit');
    AcroPDF1.gotoFirstPage;
    AcroPDF1.Visible:=true;
end;
end;



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