#1 Re: mORMot 1 » DateTime format in URI? » 2015-11-06 17:02:36

Should CustomDateTimeService.GetValues not be CustomDateTimeService/GetValues?

#2 Re: mORMot 1 » Error compiling latest sources » 2015-06-23 16:41:04

Yes, that seems to have fixed it.

Thanks!

#3 mORMot 1 » Error compiling latest sources » 2015-06-23 16:09:24

mrgcms
Replies: 2

I haven't updated in a few months, everything being stable, but this morning I downloaded the latest snapshot and updated my system. Now, when doing a full build of my app, I get an error

"[DCC Error] SynCommons.pas(2200): E2010 Incompatible types: 'NativeInt' and 'Integer'"

on the line

"var MoveFast: procedure(const Source; var Dest; Count: PtrInt) = System.Move;"

This is on Delphi XE.

Is this a real bug in the latest sources, or have I done something wrong?

Thanks

#4 Re: PDF Engine » Multiple calls to AppendRichEdit fails » 2012-04-12 16:32:52

Thanks Arnaud, that did the trick.

I added the NewHalfLine to my code and that fixed the problem. I then removed that and modified the TGDIPages code to verify that your fix would work - that also worked fine.

Thanks for a great package and great support!

#5 PDF Engine » Multiple calls to AppendRichEdit fails » 2012-04-11 20:11:58

mrgcms
Replies: 3

I've written a routine which takes a PCL printer file, strips out the PCL codes and prints the remaining text to a PDF using TGDIPages.  One of the features is that when a PCL new page command is found, a new PDF page should be created. At this point, the rich edit contents are written to the PDF, the rich edit is cleared for the next page and a new page is added to the PDF. When I run the app, which has two pages, the first page is placed in the PDF, but the second page is not. The rich edit does have the correct second page contents though. This is the code that I'm using:

procedure TPCLForm.ConvertReport(rpFileName, outputFile: string);
var
  i    : Integer;
  line : string;
  pdf  : TGDIPages;
begin
  FPclFile := TStringList.Create;
  FPclFile.LoadFromFile(rpFileName);
  try
    pdf := TGDIPages.Create(self);
    try
      pdf.BeginDoc;
      try
        i := 0;
        while i < FPclFile.Count do
        begin
          line := FPclFile[i];

          // see if font needs to be changed
          CheckFont(line);

          // see if there is a newline command in the line
          if IsNewline(line) then
          begin
            pdf.AppendRichEdit(RichEdit.Handle);
            RichEdit.Clear;

            // create a new page in the PDF
            pdf.NewPage;
          end;

          // remove the PCL codes
          RemoveCode(PCL_LANDSCAPE, line);
          RemoveCode(PCL_VERTICAL, line);
          RemoveCode(PCL_PORTRAIT, line);
          RemoveCode(PCL_NEW_PAGE, line);

          RichEdit.Lines.Add(line);

          Inc(i);
        end;
        if RichEdit.Lines.Count > 0 then
          pdf.AppendRichEdit(RichEdit.Handle);
      finally
        pdf.EndDoc;
      end;
      pdf.ExportPDF(ChangeFileExt(outputFile, '.pdf'), true, false);
      pdf.ShowPreviewForm;
    finally
      pdf.free;
    end;
  finally
    FPclFile.Free;
  end;
end;

This is using Delphi 7 and the latest stable version of your components.

Board footer

Powered by FluxBB