Hello,
we are still testing the feature of copying text from one pdf to another.
we still have 2 open points
1. in some pdfs words are split by single blanks. for example in the attached example pdfs (example.zip)
original (original_ocr.pdf): "laufender Betrieb der virtuellen Clients/Desktops"
copied text (spire_copy_ocr.pdf): "l auf ender Bet rieb der virt uell en Client s/Deskt ops"
as a workaround, i can increase the text size a little so that the letters are a little closer together, so the result is better, but then, as a side effect, one or the other “real” blank space disappears. is there a better solution?
coding: fontSize = fontSize + 1.5f;
2. we still have problems with page rotations. an example pdf (unfortunately a customer pdf that i cannot provide) has a rotation of 270. the copied text is not displayed correctly in this pdf. what should the coding look like? (based on the above example of the “RotateAngle90” which works well)
another question
- Code: Select all
PdfTextFinder finder = new PdfTextFinder(page);
findOptions.Parameter = TextFindParameter.WholeWord;
finder.Options = findOptions;
List<PdfTextFragment> frags = finder.FindAllText();
here, there only seem to be letters in “frags” - I would have expected whole words (parameter “WholeWord”) to be found here. Or am I misunderstanding the parameter?
thank you!