#1 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 15:49:28

Dear Rvk,

I shall definitely keep in mind your valuable input regarding Setfont.

However, I assure you that before posting here I have done several tests/tracing sessions. All my results suggest that on D7 the problem I described is there.

#2 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 14:59:51

Dear Rvk,

I am NOT facing any text issues without the Setfont. Not in mORMot1. Not in mORMot2. I get correct PDFs using both as far as text objects are concerned.

Thanks for pointing out the Setfont workaround.

Regards.

#3 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 12:47:55

@rvk,

I acknowledge & appreciate your help.

However, I am not facing any text issues using SynPdf for past multiple years. In the beginning we had some issues with box-text object in the wmf files which we managed to trace & resolve in the enum function. If I manage to get the images issue resolved then I intend to stay with SynPdf which is working fine for us.

Anyway thanks for your inputs. Much obliged.

#4 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 12:11:46

RVK,

Thanks for your inputs. Text issue I shall manage. I need a solution for images at bottom of page being skipped.

#5 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 10:45:01

Hi AB,

I downloaded SynPdf from the link provided by you & re-built the project. I still do not get the two images at the bottom of the page.

My current situation :

D7 / SynPdf (latest as per your link) :-> Skipped images at bottom. (Using VclCanvas.Draw)

D7/ mORMot2 : -> Skipped images at bottom. (Using VclCanvas.Draw)

#6 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 10:06:46

AB,

I shall check the dates & report back. thanks.

Edit : Indeed, the SynPdf i am using has timestamp 11/12/2022. So, you've made some changes which i dont have. I shall download and check tonight. Thanks.

#7 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-24 09:51:39

RVK,

Maybe because i am using D7 (for compiling the project) hence we are getting different results on the Draw function.


I shall check out your gist code & report back. However I dont have any issues with fonts if i use SynPdf/D7. So i am sure i can get around that issue (if i shift to mORMot2). My worry is VclCanvas.Draw skipping images below 6 inches (approx).

Regards & thanks

#8 Re: PDF Engine » Need help/direction for WMF file. » 2025-06-23 12:22:31

Hi,

Firstly, my apologies for posting a message & disappearing.

Thanks RVK for your enthusiastic replies. I have taken the cue & shifted to mORMot-2. However i am still getting same results as i was getting from SynPdf. (see attached files). My issue is simple : I am using VclCanvas.Draw for past multiple years without any problems. However, the Draw function is skipping the images at the bottom of the page. And yes, i am using D7.

AB, Firstly thanks for SynPdf. We have been using it for multiple years to generate PDFs from the WMFs generated by a report-writer. Trust me i have had NO PROBLEMS with SynPdf till this one. My question is simple : if RenderMetaFile is able to add the images at bottom of page then why is VclCanvas.Draw skipping the images at bottom of page.


Sample Project for Testing (D7/mORMot2)

Input file with images at bottom of page (WMF)

PDF Generated using VclCanvas.Draw

#9 PDF Engine » Need help/direction for WMF file. » 2025-04-19 07:25:33

sameerpandit
Replies: 22

Hello,

I have wmf files like the one below :

Sample of WMF file

I am unable to Render/Draw the above wmf accurately in the PdfDocument.

If i tinker with the ScaleX,ScaleY parameters for RenderMetaFile method i am able to get results. However the accuracy isnt 100%.

On the other hand if i try using the VclCanvas.Draw method then images at bottom of page are missing in the Pdf.

Any sort of guidance will be appreciated.

-Sam

PS : I am not using any code worth mentioning. Simply like below :

Sample of code used

PPS : Edited the URLs. Thanks for pointing out RVK.

#10 Re: PDF Engine » [Ignore] Drawing. Wmf containing image » 2025-02-07 11:28:20

@rvk

Ok. Thanks for trying.

I google searched & found couple of threads on
Stackoverflow where people had same issue (not
with synpdf). It's related to D7.

#11 Re: PDF Engine » [Ignore] Drawing. Wmf containing image » 2025-02-07 09:02:11

@rvk
I am simply using code from the thread titled
"Render metafile....... ". It's second in the sticky
List.

To confirm the issue I created a wmf file with images of
1 inch height. on A4 size page. Last image would
get skipped.

Please note I have not tried this on any other version.
Only D7.

#12 PDF Engine » [Ignore] Drawing. Wmf containing image » 2025-02-07 05:17:22

sameerpandit
Replies: 5

Hi,

I am use Synpdf with D7.

I am drawing wmf on page canvas. However
If my WMF file contains image at bottom of
Page (approx. below. 6 inches) then it won't
Show in pdf.

I tried to trace the issue & found that the enumeration
Function skips the image.

Is this issue related to Delphi 7 ?
Is any workaround possible?

Thanks.

Board footer

Powered by FluxBB