Export QR code as PDF file

  • Last Post 15 June 2018
  • Topic Is Solved
lx11020219 posted this 12 June 2018


I have two questions.

1. When I read the QR code and export it as a PDF file, the end is lacking.
  There is no problem when outputting text.
  Do you need any options when exporting as a PDF file?

  Attach the target file.




// Engine Load...

// QR Code Read
FRDocument document = engine.CreateFRDocumentFromImage(strImagePath, null);
DocumentProcessingParams dpp = engine.CreateDocumentProcessingParams();
dpp.PageProcessingParams.PageAnalysisParams.BarcodeParams.Type = (int)FREngine.BarcodeTypeEnum.BT_QRCode;

// PDF Export
FREngine.PDFExportParams pdfParams = engine.CreatePDFExportParams();
pdfParams.Scenario = FREngine.PDFExportScenarioEnum.PES_Balanced;
document.Export(strPDFPath, FREngine.FileExportFormatEnum.FEF_PDF, pdfParams);

// Text Export
document.Export(strTextPath, FREngine.FileExportFormatEnum.FEF_TextUnicodeDefaults, null);
document = null;

// Engine Unload...


2. Can you execute regular OCR and QR code reading at the same time and export the PDF file with OCR text data and QR code text data attached?

Attached Files

Order By: Standard | Newest | Votes
Daria Zvereva posted this 14 June 2018


1. When you export the barcode to the PDF format, the end of the barcode text doesn’t fit the page size. You can`t see it, because it`s off the page. If you copy the text with Ctrl+A, Ctrl+C and then paste it in some document, you will see that everything is correct. You can also follow the link from the PDF document. If you need to get the whole text on the page you may use the PaperSizeMode parameter of the PDFExportParams object. 

pdfParams.PDFFeatures.PaperSizeParams.PaperSizeMode = FREngine.PaperSizeModeEnum.PSM_UserDefined;
pdfParams.PDFFeatures.PaperSizeParams.PaperWidth = 50000;

2. To recognize text and barcodes simultaneously you may use any predefined profile for text extraction with the user profile which contains the following setting:

DetectBarcodes = TRUE


  • Liked by
  • lx11020219
lx11020219 posted this 15 June 2018

thank you for your answer.
Your answer was very useful and the doubt was resolved.

1. The cause was that the text data protruded.
I could confirm that it can be acquired correctly with Sample code.

2. I was able to confirm that I can now acquire it with Sample code.