Two Pilots™    Home  |  Navigation  |  Site Map  |  Products  |  Download  |  Prices  |  For Partners  |  Support


All forums · Statistics · Search ·

Two Pilots forum / For software developers / Access violation with HTML2PDF.dll
Author Message
Anonymous
# Posted: 4 Jan 2008 13:36


Hello,

I?m testing your HTML2PDF demo with PDF creator Pilot, using Delphi 2006 and I always receive an access violation when calling HTML.LoadFromString or LoadfromFile.
In other words, I cannot generate a PDF from my HTML file or string.

I liked very much your solution but I?m no able to generate, can you help me?

Versions:
Delphi: 2006
PDF: 3.9.914.0 (DLL File)
HTML2PDF: 3.8.50.0 (DLL File)

Here is my code:

procedure TForm1.Button1Click(Sender: TObject);
var PDF : TPDFDocument3;
HTML : THTML2PDF;
begin
PDF := TPDFDocument3.Create(nil);
try
PDF.StartEngine('demo', 'demo');
PDF.FileName := 'Fileout.pdf';
PDF.AutoLaunch := false;
PDF.BeginDoc;
HTML := THTML2PDF.Create(nil);
try
HTML.StartHTMLEngine('','');
HTML.ConnectToPDFLibrary(PDF);
HTML.LoadFromString('<HTML><BODY><H1>Hello,PDF2HTM L!</H1></BODY></HTML>','Application');
HTML.ConvertAll;
HTML.DisconnectFromPDFLibrary;
finally
FreeAndNil(HTML);
end;
PDF.EndDoc;
finally
FreeAndNil(PDF);
end;
end;


mvf
Member
# Posted: 5 Jan 2008 01:48


Please alter your DEP (Data Execution Prevention) settings as shown at this page
http://www.colorpilot.com/chm_html2pdf_faq.html

Matheus
# Posted: 7 Jan 2008 05:17


Hi,

I have altered de DEP of my windows just as described in that page and the error continue but now in another DLL.

When the program executes the instruction HTML.LoadFromString('<HTML><BODY><H1>Hello,PDF2HTM L!</H1></BODY></HTML>','Application'); I get the following error:

Project Project1.exe raised exception class EAcessViolation with message 'Access violation at address 43D4F150 in module 'mshtml.dll''. Write of address 43D4F150.

Thanks.

Matheus
# Posted: 7 Jan 2008 05:37


If I undo DEP changes, then the message received is Project Project1.exe raised exception class EAcessViolation with message 'Access violation at address 0155D207 in module 'HTML2PDF.dll'. Read of address 00000000'

I don?t know what to do. Can you help me?

fredr
# Posted: 2 Feb 2008 15:27


Hello,
I?m also testing HTML2PDF demo with PDF creator Pilot, using Delphi 2006 and I also receive then same access violation when calling HTML.LoadURL().
Can you help me ?
Thanks.

mvf
Member
# Posted: 3 Feb 2008 22:02


And you also have your DEP (Data Execution Prevention) turnedd off?

fredr
# Posted: 4 Feb 2008 05:46


I follow the instructions found here : http://www.colorpilot.com/chm_html2pdf_faq.html.

First, "Turn on DEP for essential Windows programs and services only" was checked.
When, I checked "Turn on DEP for all programs and services except those I select", and kept the list empty. Aftet rebooting, the error message "Access violation at address xxxxxx in module 'HTML2PDF.dll'. Read of address 00000000'" was already here.
Second, I added HTML2PDF Pilot in the DEP list, and reboot one more time. Same error message.

Do you have an idea of what I can do ? Because your program should exactly do what I need ! Converting URL to PDF from my own application.

Thanks.

mvf
Member
# Posted: 4 Feb 2008 09:52


If you mean HTML2PDF Addon (with PDFCreator Pilot) then you need to turn DEP off completely. You can do it this way:
- open boot.ini file
- in the "[operating systems]" section add "/NoExecute=AlwaysOff" flag
example:
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)WINDOWS="Micros oft Windows ..." /fastdetect /NoExecute=AlwaysOff

fredr
# Posted: 4 Feb 2008 11:51


Sorry, but but after rebooting, it doesn't work better...

 

 

Powered by miniBB 2.0 RC7 © 2001-2004 Page creation time (sec.): 0.014

 

Page top