We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Page Layout Preference of Default

I am trying to check/set the page layout preference using pdfcontenteditor and the viewer preferences. However I am trying to evaluate and set the value to default as shown in the screen shot from acrobat but do not see how to evaluate this. Can you help point me in the right direction.


Dim contentEditor As New Aspose.Pdf.Facades.PdfContentEditor(pdfDoc)

Dim prefValue As Integer = contentEditor.GetViewerPreference()

'First Check Page View Type

If (prefValue and Aspose.Pdf.Facades.ViewerPreference.PageLayoutSinglePage)=1

Hi Brent,


Thanks for contacting support.

In order to get or set page layout, you may consider using following code lines. Please take a look over attached image which shows the possible values which can be assigned using this property.

[C#]

//
load html file contents
<o:p></o:p>

Aspose.Pdf.Document doc = new Aspose.Pdf.Document("c:/pdftest/input.PDF");

doc.PageLayout = PageLayout.OneColumn;

// save updated PDF

doc.Save("c:/pdftest/Conversion.pdf");

Thank you for the info, that is a little easier then going through the facades. I need to be able to set the setting to “Default” as shown in my original screenshot. How do I do that?


It appears that this setting is based on the Dictionary Key \PageLayout. When changing this setting to “Default” within Acrobat the dictionary entry \PageLayout is removed altogether but Aspose is still reflecting this option as “Single Page” I think you may need another enum option to support this or possible allow setting this value to null or nothing.


Brent
FalconsSnowman:
It appears that this setting is based on the Dictionary Key \PageLayout. When changing this setting to "Default" within Acrobat the dictionary entry \PageLayout is removed altogether but Aspose is still reflecting this option as "Single Page" I think you may need another enum option to support this or possible allow setting this value to null or nothing.
Hi Brent,

Thanks for sharing the details.

I have logged the above stated requirement as PDFNEWNET-37049 in our issue tracking system under enhancements list. We will further investigate this requirement in details and will keep you updated on the status of a correction.

We apologize for your inconvenience.



Our company is also highly interested in this feature (setting page Layout to ‘default’).

We are currently evaluating aspose pdf and this feature is the only missing one out of a list of six required features.

If it is not fixed, we have to use another product.

Best Regards

Jean, COI GmbH

Hi Jean,


Thanks for contacting support.

As the above sated feature is logged as new requirement, so development team will definitely analyse this feature and will determine if we can support this feature or not. Nevertheless, we will keep you posted with the status of implementation.

The issues you have found earlier (filed as PDFNEWNET-37049) have been fixed in Aspose.Pdf for .NET 9.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Jean,


As stated above your requested feature has been implemented. A Default value is included in PageLayout enum. Please check following code snippet for the reference.

// load PDF file<o:p></o:p>

Aspose.Pdf.Document doc = new Aspose.Pdf.Document("input.PDF");

doc.PageLayout = PageLayout.Default;

// save updated PDF

doc.Save("Conversion.pdf");


Please feel free to contact us for any further assistance.


Best Regards,