hi @asad.ali,
thx for our time.
We fully integrated the Aspose.PDF dll in our software.
The listed parameters were configurable via server settings
I’ll provide all information I have, but in some cases it’s really hard to get any hints on the effect in the generated PDF.
Aspose.Pdf.Generator.Pdf generator = new Aspose.Pdf.Generator.Pdf();
Aspose.Pdf.Document document = new Aspose.Pdf.Document();
property ‘CompressionLevel’
also our the documentation is very poor.
- possible values are integer from 0-9 as a ratio
- our default configuration was 6
- I think, it was something in the direction of (similar to some zip tools):
– 0 means no compression → fast conversion
– 9 means maximum compression → slow conversion
Question: it there somewhere a article about PDF Compression in Common? Or Just something with ImageCompression and so on?
generator.CompressionLevel = 0;
property ‘Conformance’
possible values are:
public enum PdfConformance
{
None = 0,
PdfA1B = 1,
PdfA1A = 2
}
Depending the conformance, i found this article Convert PDF to PDF/A formats|Aspose.PDF for .NET
I think this is enough for me #noHelpRequired
property ‘DestinationType’
The first page of the PDF document is opened in the variants
- FitBox,
- FitHeight,
- FitPage,
- FitWidth,
- Retain.
to replace the code ‘generator.DestinationType = Serversettings.PDF_Destination_type’
I implemented the following functionality, but i do not know whether the implementation is correct
// DestinationType
int destination_type = Serversettings.PDF_Destination_type;
Aspose.Pdf.Annotations.IAppointment open_action = null;
switch (destination_type)
{
case 1: // FitPage
open_action = new Aspose.Pdf.Annotations.FitExplicitDestination(document.Pages[1]);
break;
case 2: // FitWidth
open_action = new Aspose.Pdf.Annotations.FitHExplicitDestination(document.Pages[1], 0);
break;
case 3: // FitHeight
open_action = new Aspose.Pdf.Annotations.FitVExplicitDestination(document.Pages[1], 0);
break;
case 4: // FitBox
open_action = new Aspose.Pdf.Annotations.FitBExplicitDestination(document.Pages[1]);
break;
default:
open_action = null;
break;
}
document.OpenAction = open_action;
property ‘IsBookmarked’
I think this was a global flag to disable Bookmarks in common
since there are BookmarkLevel properties on documenttypes where it is possible to have Bookmarks, we’ll remove this setting
I think this is enough for me #noHelpRequired
generator.IsBookmarked = true;
property ‘OpenType’
In the PDF document, you can set how the plug-in that displays the PDF document should
preferably open (Auto, Bookmarks, Fullscreen, None, Thumbnails).
could it be that this is replaced with document.PageMode ?
generator.OpenType = Aspose.Pdf.Generator.OpenType.Auto;