Hello,
Used the below code snippet to convert barcode to PDF. If the barcode is converted directly to PDF or jpg, the image is getting distorted if the image is zoomed to 500%+.
So, converted the barcode to svg and svg is converted to PDF. In the PDF the barcode numbers are not properly visible. The expectation is - the output should be PDF, image quality should not be distorted if magnified (Vector Image) and Barcode should be clearly visible. Please let us know if the result is the same with licensed version also. If so please help us to rectify the issue.
Code snippet:
void geneateBarcode(std::string encType, System::String code, System::String pdfFile, System::String svgFile)
{
try
{
// Instantiate barcode object and set differnt barcode properties
System::SharedPtr<BarcodeGenerator> generator = System::MakeObject<BarcodeGenerator>(EncodeTypes::Code39Standard, code);
// Save the image to your system and set its image format to Jpeg
generator->Save(svgFile);
auto pdf = MakeObject<Aspose::Pdf::Document>(svgFile, MakeObject<SvgLoadOptions>());
pdf->Save(pdfFile);
}
Result files:Asset.7z (126.8 KB)
Thanks,
Janci
Code snippet: