README.md in ocr-file-0.0.7 vs README.md in ocr-file-0.0.8
- old
+ new
@@ -77,12 +77,12 @@
doc.to_pdf
# How to merge files into a single PDF:
# The files can be images or other PDFs
- filepaths = []
- documents = file_paths.map { |path| OcrFile::ImageEngines::PdfEngine.open_pdf(path, password: '') }
- merged_document = OcrFile::ImageEngines::PdfEngine.merge(documents)
+ file_paths = []
+ merged_document = ::HexaPDF::Document.new
+ documents = file_paths.map { |path| OcrFile::ImageEngines::PdfEngine.insert_image(merged_document, path) }
OcrFile::ImageEngines::PdfEngine.save_pdf(merged_document, save_file_path, optimise: true)
```
### Notes / Tips
Set `extract_pdf_images` to `false` for higher quality OCR. However this will consume more temporary space per PDF page and also be considerably slower.