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 PdfCreatorPilot.dll
Author Message
Juan marcos Rojas soza
Member
# Posted: 2 Sep 2007 21:07


I have a service that use the PsfCreatorpilot3.dll and de Html2pdf.dll for convert many files to html and pdf files.
All is fine until 978 files aprox, then the instruccion "HTM.CONVERTALL" produce an Access Violation .
I ask if exist any restriction about of number of files to process?
I send the code delphi6 , please I need your help.
function Rhtml2Pdf(var RutaMAIL,
RutaUpload,
NombrePDF,
NombreHTML: string;
EMAIL: Boolean;
var NombreAdjunto: String;
MemoriaHTML: TMemoryStream):Boolean;
var

PDF :IPDFDocument3;
//PDF : TPDFDocument3;
HTML : IHTML2PDF2;
// HTML : THTML2PDF2;
TextoHTML : TStringList;
begin
try
TextoHTML := TStringList.Create;
TextoHTML.LoadFromStream(MemoriaHTML);
CoInitialize(nil);
PDF := CreateComObject(CLASS_PDFDocument3) as IPDFDocument3;
PDF.StartEngine(gRegPDF,gCodPDF);
PDF.AutoLaunch := False;
PDF.FileName := NombrePDF;
PDF.ViewerPreferences_vpFitWindow := true;
PDF.PDFPAGE_Size := psLetter;

CoInitialize(nil);
HTML := CreateComObject(CLASS_HTML2PDF2) as IHTML2PDF2;
HTML.StartHTMLEngine(gRegHTML,gCodHTML);
HTML.ConnectToPDFLibrary(PDF);

// HTML.SetLogFile('C:PicassoFallos.txt');

HTML.LoadHTMLString(TextoHTML.Text,'');

HTML.AutoAdjustContentWidth := True;
HTML.AutoAdjustPageWidth := True;
PDF.Resolution := 93;

PDF.LogActionsAndErrors := True;

PDF.PDFPAGE_Height := PDF.PageHeight - 8;
PDF.PDFPAGE_Width := PDF.PageWidth - 8;
PDF.BeginDoc;
PDF.FontEmbedStyle := 2;

HTML.ConvertAll;

HTML.DisconnectFromPDFLibrary;

PDF.EndDoc;



MemoriaHTML.Clear;
MemoriaHTML.LoadFromFile(NombrePDF);
MemoriaHTML.SaveToFile(RutaUpload + ExtractFileName(NombrePDF));
if EMAIL then begin
NombreAdjunto := RutaMAIL + ExtractFileName(NombrePDF);
MemoriaHTML.SaveToFile(NombreAdjunto);
end;

if UpperCase(gGeneraHTML) = 'NO' then
DeleteFile(NombreHTML);
RESULT := True;
PDF := nil;
CoUninitialize;
HTML := nil;
CoUninitialize;
except
on E: Exception do begin
SvrEvent_SendMsgLog(LOG_ERROR_TYPE,TYPE_PICASSO_IN I,ETIQUETA_NO_DEFINIDA, E.Message);
HTML.DisconnectFromPDFLibrary;
PDF.EndDoc;
TextoHTML.Free;
Result := False;
PDF := nil;
CoUninitialize;
HTML := nil;
CoUninitialize;
end;
end;

mvf
Member
# Posted: 5 Sep 2007 21:58


What are exact versions of HTML2PDF Addon and PDFCreator?

Anonymous
# Posted: 5 Sep 2007 23:13


HTML2PDF Add-on 3.5
PDF Creator Pilot 3.6

Juan marcos Rojas soza
Member
# Posted: 5 Sep 2007 23:14


HTML2PDF Add-on 3.5
PDF Creator Pilot 3.6

Juan marcos Rojas soza
Member
# Posted: 5 Sep 2007 23:15


You have any idea?

mvf
Member
# Posted: 5 Sep 2007 23:31


Update please your PDFCreator and HTML2PDF Addon to the latest versions.
HTML2PDF Add-on - 3.7
PDF Creator Pilot - 3.6.366

Juan marcos Rojas soza
Member
# Posted: 6 Sep 2007 10:14


I test with the latest version of libraries and give me then same result.

is a bug ?

Karen Misel
# Posted: 2 Dec 2007 00:29


MARCOS HARVEY ROJAS KILLED SOMONE

Zac Porter
# Posted: 2 Dec 2007 00:34


Marcos Harvey Rojas a Jalisco Mexico Native now living in Los Angeles is anticipating his first book, for the launch of His Clothing line.
He has also been working on a few film projects as an assistant, P.A and extra, he is seeking representation for a shot of a role on the remake of Labyrinth said to star Hillary Swank

Fink Morgan
# Posted: 2 Dec 2007 00:36


Marcos Harvey Rojas made an appearance at the 2007 Scream Awards

Fink Morgan
# Posted: 2 Dec 2007 00:37


Marcos Harvey Rojas is the Best assistant in Los Angeles

 

 

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

 

Page top