LEADTOOLS Support
ePrint
ePrint Questions
Re: What is the range of values for QFactor for Raster PDF formats?
This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Wednesday, March 18, 2009 6:38:11 AM(UTC)
Groups: Registered
Posts: 5
I am using the following formats saving Image type document in PDF format: FILE_RAS_PDF_JPEG,FILE_RAS_PDF_JPEG_411,FILE_RAS_PDF_JPEG_422,FILE_RAS_PDF.
It looks like for these formats the QFactor range is 1 -100. When I set QFactor to 1 and use FILE_RAS_PDF_JPEG_411 or RAS_PDF_JPEG_422, generated PDF file cannot be opened (error states that the file is damaged and cannot be repared).
#2
Posted
:
Wednesday, March 18, 2009 12:24:20 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
What is the product ID of ePrint that you are using? You can get this by opening the Workstation, then selecting Help -> About
Are you a developer using the ePrint API or just an end-user?
Does this problem occur when saving a PDF from the regular "LEADTOOLS ePrint 5" printer, the "LEADTOOLS ePrint 5 Workstation" printer or both?
Does this happen with all source files or only some?
#3
Posted
:
Thursday, March 19, 2009 5:04:38 AM(UTC)
Groups: Registered
Posts: 5
I am using ePrint 5. Product Id 5.0.1.121 - 14.5.0.073. I am developer using ePrint APIs.
It looks like it is only a problem when I set properties dynamically in the code (I am using C#) and only when QFactor =1. Setting QFactor to 2 works fine. Using Save as dialog to set all the same settings with QFactor =1 also work fine.
This is the code I am using:
epnPrint.StartDocumentConversion(printername, 0);
epnMultiSaveOptions = new LPEPCLib.EpnMultiSaveOptionsClass();
epnMultiSaveOptions.SaveElementsCount = 1;
epnMultiSaveOptions.UseSave = true;
epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.FileName = filename; epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.DocumentOptions.MultiPageFile = true;
epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.DocumentType = LPEPCLib.DocumentTypeConstants.FT_SAVE_TYPE_RASTER;
epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.RasterOptions.MultiPageFile = true;
epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.RasterOptions.BitsPerPixel = 24;
epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.Format = LPEPCLib.ePrintFileConstants.FILE_RAS_PDF_JPEG_411;
epnMultiSaveOptions.get_PrinterSaveOptions(0).SaveOptions.RasterOptions.QFactor = 1;
epnPrint.SetPrinterSaveOptions(printername, epnMultiSaveOptions);
epnPrint.EndDocumentConversion(printername, 0);
Could is be a problem that I am creating new instance of the LPEPCLib.EpnMultiSaveOptionsClass? I tryed to use epnPrint.GetPrinterSaveOptions(), but it does not return the saved settings. SaveElementsCount is always 0.
#4
Posted
:
Friday, March 20, 2009 7:20:20 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 764
According to the documentation in the article "Compression Quality Factors", the range of values for a lossy JPEG compression is 2-255. 0 means that you are using Lossless JPEG compression, which PDF does not support. 1 is not specifically documented, but I believe it is handled the same way as 0. Therefore, if you want to save the maximum quality JPEG compression, use 2.
The end-user dialog uses the values 1-100 for simplicity's sake since using a percent-like value is more easily understood by end-users.
LEADTOOLS Support
ePrint
ePrint Questions
Re: What is the range of values for QFactor for Raster PDF formats?
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.