Export QR code as PDF file

  • 34 Views
  • Last Post 1 weeks ago
  • Topic Is Solved
lx11020219 posted this 2 weeks ago

Hello.

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.

  Example:

   PDF:https://www.marugame-seimen.com/at

   TXT:https://www.marugame-seimen.com/at?referrer=rcptqr&id=0B0385,01,0133EE32,0B99


// Engine Load...

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

// 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.Close();
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 2 weeks ago

Hello! 

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:

[PageAnalysisParams]
DetectBarcodes = TRUE

 

  • Liked by
  • lx11020219
lx11020219 posted this 1 weeks ago

Hello.
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.

Close
We changed our Privacy Policy and Cookie Policy effective May 25, 2018. Click on the links to find out more.