#3 Re: PDF Engine » RightToLeft string with numbers or English characters not show correct » 2022-06-29 14:06:35

ab wrote:

Is the output from UniScribe correct in the debugger?
(i.e. are the glyph blocks correct?)

Could you try with another font?

The output is wrong if UniScribe =true.
If it's false, than the Hebrew/Arabic strings are in reverse order.
This is how I'm working now.  I reverse it and it shows ok, but there are issues with the alignment.

I'm using Times New Roman and Tahoma fonts in the demo.
I changed to Segoe UI with no success.
They are global fonts, it should not happened.
Shraga

#5 PDF Engine » RightToLeft string with numbers or English characters not show correct » 2022-06-26 14:21:43

shragam
Replies: 6

Hi
I'm using the last update of the library (download it today).
The is an issue with Hebrew/Arabic string with numbers/English characters inside.
Here is the export code:

procedure TForm15.PdfDocumentClick(Sender: TObject);
var
    ppdf : TPdfDocument;
    pagemeta : TMetafile;
    p : integer;
begin
  Application.CreateForm(tForm16,Form16);
  form16.ADODataSet1.Open;
    ppdf := TPdfDocumentGDI.Create;
    ppdf.EmbeddedTTF:=true;
    pPdf.UseUniscribe:=True;
    form16.QuickRep1.prepare;
    for p := 1 to form16.QuickRep1.QRPrinter.PageCount do
    begin
      pagemeta := form16.QuickRep1.QRPrinter.GetPage(p);
      try
        pPdf.DefaultPageWidth := MulDiv(pagemeta.Width,72,pPdf.ScreenLogPixels);
        pPdf.DefaultPageHeight := MulDiv(pagemeta.Height,72,pPdf.ScreenLogPixels);
        pPdf.AddPage;
        // draw the page content
        pPdf.Canvas.RenderMetaFile(pagemeta,1,0,0);//
      finally
        pagemeta.Free;
      end;
    end;
    ppdf.SaveToFile('c:\temp\PdfDocument.pdf');
    ppdf.free;
end;

for examples if i tried to export the string: יום א 26/06/2022 10:00:02
it exported ok if bidimode is LeftToRight, but wrong if it's RightToLeft as it should be.
Screenshot-1.jpg

If I change the code to

AScriptState.uBidiLevel := 0; 

then it's ok, but still there are other issues like this:

Screenshot-2.jpg

This is how it's looking when

AScriptState.uBidiLevel := 1; 

Screenshot-1.jpg

Any help about create PDF correctly in Hebrew/Arabic ?
Shraga

#6 Re: mORMot 1 » What is the correct way to create API web server and how to start ? » 2022-05-13 05:40:49

ab wrote:

Ensure you read https://tamingthemormot.wordpress.com/2 … databases/
and the mORMot documentation about interfaces and services.

I'll read it again

#7 Re: mORMot 1 » What is the correct way to create API web server and how to start ? » 2022-05-12 12:36:22

ab wrote:

1. Define your services as interfaces.
One interface per execution scope - not a single interface for all.

2. Then implement the interfaces as classes, calling the datamodules queries.
Note that ADO (and VCL) are not multi-threaded, so you should ensure the interface is run in the main thread.

You can of course start with a few methods, and see how it works for you.

1. I have no idea how to it. Never defined interface ?. How I can access to my ADODataset events?

On my customer card form for example, I have ADODataset_Custs that his events like BeforePost, AfterPost and so on call this to the same object on the Data Module  and there I handled the validation and other rules.
If the  rule is not ok, I raise an exception and handle it on the main form.   

2. I know it.

Hope I explained it ok, I'm newbie in all this subject.
Shraga

#8 Re: mORMot 1 » What is the correct way to create API web server and how to start ? » 2022-05-12 10:08:59

My application is win32 VCL and dbGo ADOConnection, ADODataset etc.
I read the FAQ in the last few days and checked out some examples. The truth is I got pretty lost.
I'm used to working with components and events of Adding / Saving / ADODataset events.
I could not see here how I can use all my code and the logic that exists in my existing system.
I just need to write the web server side for my application and use my current code. (Is it possible ?) 

1. Looks like everything needs to be rewritten and I can not use any of my existing code in the Data modules(all the logic and events in TADODataset)?
2. Are there objects/components here for managing everything related to working with the database in terms of the server side?
Any help/direction what to do ?

Thanks

#9 Re: mORMot 1 » What is the correct way to create API web server and how to start ? » 2022-05-10 09:44:36

ab wrote:

1. You can stay with ADO if you have already existing code, and want to publish them as interface-based services.
But be aware that ADO has poor performance, and you need to intialize the OLE layer in each thread. So the interface-based services could e.g. run in a dedicated thread (see the options).
So I would consider using our direct ODBC/OleDB access classes to MSSQL instead of ADO. Note that for MSSQL, Zeos has no real benefit in respect to our ODBC and OleDB direct layers.

2. Start with the FAQ of mORMot 1.
And for your case, https://tamingthemormot.wordpress.com/2 … databases/

3. Yes, mORMot is always correct, it even makes coffee and can be used go to Mars. wink
But to publish services using interfaces, it is just a nice tool.

Thanks

1. Today I'm already working with ADO and thread , create an adoconnection in every thread. (I'm working against MSSQL server).
I need to continue working with my current win32 application and also support web access. 
2. I'll start reading .
3. Good to know it ?
4. I'll back back with more questions after reading?

#10 mORMot 1 » What is the correct way to create API web server and how to start ? » 2022-05-10 08:59:02

shragam
Replies: 8

I apologize if the question is not the most obvious, but I have no experience at all with this framework/server.

I'm using Delphi 11.1 and my application is win32 and SQL server with ADO.
I need to create an API web server to my application that will enable to get/update/delete data from a web browser.
I read about mORMot framework and want to try it instead of DataSnap WebBroker application.

I have some questions:
1. Can I stay with ADO (All my code and Data Module is With ADO components and most of the logic is in the DM) ?
2. How do I get started with mORMot to develop a small testing server?
3. Dose mORMot  is the correct solution ?

Thanks

#11 Re: PDF Engine » Rendering Meta File making border lines thicker » 2020-04-23 09:28:37

Thanks
It's save my life .
Fix issue with no left,top,bottom, right report frame.
Before
exjzztoncztk.jpg
after
zimmzmyjmzwn.jpg

This issue still exsits sad

#12 Re: PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-08-22 12:53:37

ab wrote:

Yes, I know but it may break other content, which where rendered as expected previously.
We did not want to introduce any regression.

Hi
Do you have a sample or how to simulate  this break   ?
After this fix' all my report are export to PDF as i was expected.

The missing lines is very aesthetic issue  for my pdf reports and my customer do not like this.

Shraga

#13 Re: PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-08-21 10:45:49

ab wrote:

Sounds like an issue.

But I'm quite sure that

E.Canvas.FNewPath := false;

at the place you propose is not a safe fix: it seems to by-pass the whole FNewPath pattern.

Now i can see the all missing lines smile
Thanks

#14 Re: PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-07-31 14:22:51

shragam wrote:
ab wrote:

I do not use QReport with SynPDF, since we rely here on our mORMotReport.pas unit for this.
And there are not problem with lines, either vertical or horizontal.

My guess is that QReport do create some meta file content which is not well understood by the SynPDF metafile renderer.
Perhaps you may search in this direction.
Try to use a tool like EmfExplorer to guess what is wrong here.
http://frazmitic.free.fr/emfexplorer/

I will try to save this report to emf and open the file with this program

Hi
I was checked the report in EMF format.

The lines are there, but not in SynPDF sad
If you want, i can send you the empf file and the pdf file.

#15 Re: PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-07-02 18:00:51

ab wrote:

I do not use QReport with SynPDF, since we rely here on our mORMotReport.pas unit for this.
And there are not problem with lines, either vertical or horizontal.

My guess is that QReport do create some meta file content which is not well understood by the SynPDF metafile renderer.
Perhaps you may search in this direction.
Try to use a tool like EmfExplorer to guess what is wrong here.
http://frazmitic.free.fr/emfexplorer/

I will try to save this report to emf and open the file with this program

#16 Re: PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-06-27 17:29:25

Hi
Any Updates/News for my problem ?
Can some one  fix this problem  ?

#19 Re: PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-02-20 15:10:23

Update
The same situation also with horizental lines .

#20 PDF Engine » Vertical lines are missing randomaly in QReport + QRShape » 2014-02-20 14:21:45

shragam
Replies: 22

Hi
I have a simple report with a band, two fields and QRShape with style= qrsVertLine to separate them.
In the preview the vertical line shown ok, but in the pdf the line show in some rows and
disappear in some others.
If I add one more QRShape with style= qrsVertLine, then the first line show in all rows but the second disappear in some other 
I'm using the last version: "mORMot_and_Open_Source_friends_2014-02-19_192831_0ba8e6c238"

Here is the one line image:
d53b6ca65663a6b0cc6434442ecaed6e.jpg
Here is the two lines image:
af6b8ad78f0e3d43aa73103eccbaea2c.jpg
Here is the QReport Preview for two lines:
645eb22436664879824e863b68ec5f4f.jpg

Any Help
Shraga

#21 Re: PDF Engine » Problem with bidimode righttoleft mixed string » 2013-07-04 06:42:50

ab wrote:

Did you try with UseUniscribe := false?

Are you using the latest unstable version (from "Download" / "Get the source" link above)?

Hi
Any news/ suggestion for my problem ?
Best Regard
Shraga

#22 Re: PDF Engine » Problem with bidimode righttoleft mixed string » 2013-07-01 18:20:45

Hi
When i put UseUniscribe := false, the letters are reverse but the spaces are ok .
insted of:
אבג 123 סיום
it was:
םויס 123 גבא
I was download today the last version

#23 PDF Engine » Problem with bidimode righttoleft mixed string » 2013-07-01 16:24:00

shragam
Replies: 4

Hi
First, i just found your project and love it smile
I have a problem to mix hebrew and number or english together.
I was created a simple quick report that contain then string "אבג 123 סיום"
when i run the following code, then pdf was created but "אבג  123סוף" with 2 spaces together.
If the string is contain (123), then the result is )123(.
The QRLabel was bidimode=bdRightToLeft.

var
    vpdf : TPdfDocumentGDI;
    pagemeta : TMetafile;
    p : integer;
begin
    Application.CreateForm(tForm16,Form16);
     vpdf := TPdfDocumentGDI.Create(true, 1255,false);
    vpdf.CompressionMethod := cmNone;
    vpdf.UseUniscribe:=true;
    form16.QuickRep1.prepare;
    for p := 1 to form16.QuickRep1.QRPrinter.PageCount do
    begin
      vpdf.AddPage;
      pagemeta := form16.QuickRep1.QRPrinter.PageList.GetPage(p);
      vpdf.VCLCanvas.Draw(0,0,pagemeta);
    end;
    vpdf.SaveToFile('c:\temp\metafilepdf.pdf');
    vpdf.free;
end

Is there any help for this situatuion?
Best Regard
Shraga

Board footer

Powered by FluxBB