We have a WPF application that has a print preview dialog. When we create the PDF to match this print preview dialog, we want the PDF to show a 100% match. For instance, we have a WPF TextBlock with a set height and width and some content that wraps in the text block. We then want to recreate this text exactly in the PDF. So far we have tried a PDF component and we have found that for the most part this looks correct, but wrapping will not always match 100%. For example, where the print preview WPF TextBlock shows 7 words on a line, the PDF created with the PDF component may only show 6 (with the seventh on the next line).
Is it possible to get a 100% match between our WPF TextBlocks and the PDF textblock? Or is this a limitation in going from the WPF textblock to the PDF textblock which any component will never be able to overcome? We really want the print preview to show a perfect match to what will be delivered to our customers in the PDF.
We used Tall Components TallPdf to create the PDF and have found that it matches extremely well. To get a close match using the TallPDF component we had to:
After accounting for these items, the PDF textblock matched the WPF Textblock exactly.