WPCubed Product Support

Metafile vs selectable text in PDF

wpsupport

For RTL text this export method is not changeable, otherwise you can select another font mode. The best support for unicode text, the CIDFont mode provides.

But in your EMF file something is weird. I insert it into Word and tried to print to Destiller - that crashed. I opened the EMF in a graphic program and only saw random characters.

When you say, you can select the text in the PDF file created by another tool, did you try copy and paste? After pasting did the correct text show up?

Inside wPDF I do not get any usable character information from emftext.emf. The text is printed using index values which point to glyphs of the font being used. Unfortunately I know now way to convert those index values back into text.

#10 ♥ 1
11k Views 2 users 1 ♥ read 3 min

But like I said, when rendering the very same metafile on Windows XPS Printer or Windows 10 PDF Printer, the text is selectable. It looks like it's only with wPDF that the text is rasterized. If we can't resolve this, we will have to use another PDF component (i.e.: PDFsharp).

#9 ♥ 0
wpsupport

In case the characters cannot be found in the selected font, or for hebrew ands arabic (RTL) text the characters will be converted into gylphs.

In your metafile this is what happens which makes the text unselectable.

#8 ♥ 0

When we draw the same metafile on another PDF Printer (iCutePDF Printer, Windows 10 PDF Printer) or Windows XPS document printer, the text is selectable. It seems that this happens only with wPDF Control.

Maybe we're not doing something right when calling the wPDF control component? Would you like me to send you the metafile in question?

#3 ♥ 0
wpsupport

wPDF will print text as text and not rasterize it. This can only happen on some text which was print using a font which cannot be found or embedded.

Regular text will be exported "as text". It is also possible that the text is already rasterized (or outlined) in the input data - this can happen with GDI+.

#2 ♥ 0

We have a Metafile that gets generated by one of our 3rd party components.

When drawing this metafile with PDFControl.Canvas.DrawImage(), the resulting PDF looks ok, but the text is not selectable (as if it was rasterized).

Could you please help us make this text selectable? We could send you a sample metafile if need be.

#1 ♥ 0