Thanks for the files. In the EMF the barcode is not present, therefor wPDF does not have the data to export it.
I assume the drawing code is not optimized to print on a metafile canvas.
Maybe it uses GetDeviceCaps(LOGPIXELSX) to get and work with the device resolution. This does not work well, it is better to set the resolution directly and work with this resoltion.
Such drawing code has to be encapsulated by SaveDC/RestoreDC.
procedure SetupVirtualCanvas(Canvas: TCanvas; TargetWidth, TargetHeight: Integer); const
VirtualWidth = 800;
VirtualHeight = 600;
begin
SetMapMode(Canvas.Handle, MM_ANISOTROPIC); // Ermöglicht freie Skalierung
SetWindowExtEx(Canvas.Handle, VirtualWidth, VirtualHeight, nil);
SetViewportExtEx(Canvas.Handle, TargetWidth, TargetHeight, nil);
end;
If the drawing code uses a special font, it would be better to buffer the output on a monochrome bitmap.