You are not logged in.
Hi synopse forum!
I come to you today to hopefully get some help on a strange matter. Basically what is happening is that when the PDF file is rendered, for some reason, the text that is aligned to the right is cut off and the box borders (QRBands) are acting weird, both of them are uneven, the bottom box one only shows very thin lines on top, left and right and a very thick line at the bottom, the top box is a bit thinner at the top, left and right and bolder at the bottom once again. If anyone has any idea what is going on, feel free to let me know! Here's a picture. From what I can see there is probably a problem with the thickness of the borders, the bottom ones seem to be thicker, the top,left and right ones seem to be thin. Thanks in advance!
*EDIT* : So I changed this line a bit :
Pdf.Canvas.RenderMetaFile(aMeta,1,0,0); to Pdf.Canvas.RenderMetaFile(aMeta,1,0,0,tpExactTextCharacterPositining)
It helped a little bit but part of the last letters still get chopped. It is worth mentioning that the font used here is Arial, when I switched to Times New Roman it was a bit better but still not perfect. Also worth noting that the issue doesn't appear when I have the font bigger, right now it's at 8 but if I put it at 12 it shows fine so it seems to be a problem with smaller font sizes.
Here's the code :
procedure ReportExport(aReport: TQuickRep; const aFileName: TFileName);
var Pdf: TPdfDocument;
aMeta: TMetaFile;
i: integer;
begin
Pdf := TPdfDocument.Create;
try
aReport.Prepare;
for i := 1 to aReport.QRPrinter.PageCount do begin
aMeta := aReport.QRPrinter.GetPage(i);
try
Pdf.DefaultPageWidth := MulDiv(aMeta.Width,72,Pdf.ScreenLogPixels);
Pdf.DefaultPageHeight := MulDiv(aMeta.Height,72,Pdf.ScreenLogPixels);
Pdf.AddPage;
// draw the page content
Pdf.Canvas.RenderMetaFile(aMeta,1,0,0);
finally
aMeta.Free;
end;
end;
Pdf.SaveToFile(aFileName);
finally
Pdf.free;
end;
end;
Last edited by Cauchemar (2015-09-21 20:01:41)
Offline
Are you using the latest trunk version from https://github.com/synopse/mORMot or https://github.com/synopse/SynPDF ?
Offline
I'm using the latest https://github.com/synopse/SynPDF version I just redownloaded it to make sure and the problem still persists!
Offline
Well I'm guessing (from the lack of replies) this is a problem beyond anyone's control. So there is no solution for it...
Offline
I do not use QuickReport, so I can't reproduce it.
You may publish the corresponding metafile.
But I do not know if it is due to a QuickReport issue (wrong canvas parameters), or to SynPdf bug.
Users reported having issue with QuickReport output.
See http://synopse.info/forum/viewtopic.php … 267#p11267
Use of EmfExplorer may help understand what's happening.
Offline
I have the same problem with one report from QuickReport (3.6.2 pro). check boxes are not displayed, some grid lines are missing and some header text is scrambled.
EmfExplorer displays the saved emf page correctly, with one exception : when GDI+ is enabled one grid is not correctly positioned.
This problem does not occure when saved with SynPdf...
I can send you the file by email if you want.
Kind regards,
Frederic
Offline
I do not have much time to investigate such EMF generated by a third party tool...
Try to find out, using EmfExplorer, which EMF_* commands may be faulty.
Once you identified which part of SynPdf needs improvement, we may start looking into it.
Offline
Good morning
I have the same problem when I export a report to PDF using SynPDF component it is " cutting " some of the fields .
Already have some solution trim it?
Something I can do to solve this problem in question?
Thank you.
Offline
Hello Friend.
Thanks for the reply , following more information :
The report is created with the FastReport component ,
the display it appears normally, but when I export to PDF it cuts the fields that are aligned right.
You have any suggestions of how to solve this problem ?
Offline
Did you try to ask for support on FastReport side ?
Did you search here and tried http://synopse.info/forum/viewtopic.php?id=1656 ?
Offline
hello,
I looked yes, but here the problem in the field, it cuts the contents of the field, as the field was less than the content it has, already has been testing greatly enhancing the same and field size so it cuts in screen appears normal,
but when you export to PDF it cuts some fields.
one more thing, only cuts the fields if the display font is smaller than 10
You has some idea of what can be done to solve this problem ?
Last edited by Eduardo_Sysmo (2016-02-25 17:06:34)
Offline