You are not logged in.
Pages: 1
We don't use the frxSynPdfExport filter because it has the mentionned issues (clipping, word position, and so on).
We're using Fast Report 5.6, and we export Fast Report report's as meta file, then we use SynPDF to create PDF files from those metafiles (.emf).
We've been experiencing various display issues, clipping issues, words overlapping each others, and so on, but all of those issues are fixed and we have a very good results using the RenderMetaFile method this way:
Pdf.Canvas.RenderMetaFile(pMetaFile, 1.1, 0, 0, 0, tpSetTextJustification, 0, 0, tcNeverClip);
Hope this helps!
Here is the solution we applied :
this is placed in procedure TPdfEnum.TextOut(var R: TEMRExtTextOut); in SynPdf.pas
begin
if ((R.rclBounds.left <> 0) and (R.rclBounds.top <> 0) and (R.rclBounds.right <> -1) and (R.rclBounds.bottom <> -1)) then //Here is the extra line to check for Bounds
if R.emrtext.nChars>0 then
with DC[nDC] do begin
SetLength(tmp,R.emrtext.nChars+1); // faster than WideString for our purpose
MoveFast(pointer(PtrUInt(@R)+R.emrtext.offString)^,tmp[0],R.emrtext.nChars*2);
ASignY := 1;
ASignX := 1;
The FastReport part is fine, I came here to post about SynPDF showing lines that have bounds set to 0 and -1.
Maybe there should be a condition at the start of the procedure TPdfEnum.TextOut(var R: TEMRExtTextOut); that checks if Bounds are > 0 and if they're not, just don't print the line in the pdf.
Hello everyone,
I'm using SynPdf to convert MetaFile generated by Fast Report into PDF file.
This is working quite nicely, only a few issue remaining, one is the following:
In the report we have some lines we are willing to hide. When inspecting the meta file, those lines are well hidden, but they appear in the pdf file.
I used EMF Explorer program to get the EMF file code as text and I spotted that the line that is supposed to be hidden has the following code :
R0019: [084] EMR_EXTTEXTOUTW (s=148) { TXT=[test ligne 2] [exScale(27.447916) eyScale(27.407408) iGraphicsMode(1), Bounds(0,0,-1,-1)] TxOPT[fOptions(4|ETO_CLIPPED), nChars(12), offDx(100), ptlRef(109,69),
rcl(109,53,292,69)] Spacing[4,6,6,4,3,4,4,6,7,6,3,7 => Total(60) =>xPtRefRight(168)]}
I think the problem here is that SynPDF doesn't get that when there is "Bounds(0,0,-1,-1)", the line is supposed to be hidden.
Anyone can help on that? This would be greatly appreciated! :-)
After many research, I found a solution to my issue.
The clipping is fixed if I use : RenderMetaFile(pMetaFile, 1, 0, 0, 0, tpSetTextJustification, 99, 101, tcNeverClip);
Instead of : RenderMetaFile(pMetaFile, 1, 0, 0, 0, tpSetTextJustification, 99, 101, tcAlwaysClip);
For a long time, I was using this method like this : RenderMetaFile(pMetaFile, 1, 0, 0, 0) and only discovered recently the TPdfCanvasRenderMetaFileTextClipping parameter!
I hope this will help other people with the same issue! :-)
Hello,
Just wanted to point out that after installing yesterday's version (fe6aa68421) the clipping issue is still not solved. I'm hoping for someone to take care of this, I'll try myself, but I'm no expert.
We're using Unicode, Builder XE5.
Oh and also, there's an error, multiple declaration of ESynException in SynCommons when compiling.
Pages: 1