Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Adobe Acrobat SDK - List of Preference Items

Guest
Jan 25, 2019 Jan 25, 2019

I am working on creating a vba script (Excel) that will create a pdf and fix the width of the document to size of the view port.  I reviewed the Interapplication Communication API Reference documentation that list all of the methods and properties of the api.  I want to use the “SetPreferenceEx” method to set the  Zoom preference  to  a value of Fit Width.  In the instructions (page28), the method provides the data type and description of the parameters. The first parameter is expecting an application preference to be provided, for example, I would expect to be able to pass “Zoom” into this parameter.  I have been unsuccessful in trying to set this parameter.  The description says to go to the Acrobat and PDF Library API reference for a list of preference items.  I found the document here , the issue I am having is that document has over 6,000 pages and I have been unsuccessful in finding the  list of preferences.  I was hoping you could provide me with a cheat sheet or a page number of where I can locate the list. 

TOPICS
Acrobat SDK and JavaScript
2.6K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Jan 26, 2019 Jan 26, 2019

Remember that preferences just change the viewer that you are targeting – it does not change the PDF. So that any else viewing the document will see their preference view.

Translate
LEGEND ,
Jan 26, 2019 Jan 26, 2019

Is zoom cruelly s preference? Where would you set it it Edit >Preferences, and would setting to do the job you want?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 26, 2019 Jan 26, 2019

Sorry, Is zoom really a... dang autocorrect

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jan 26, 2019 Jan 26, 2019

Remember that preferences just change the viewer that you are targeting – it does not change the PDF. So that any else viewing the document will see their preference view.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 28, 2019 Jan 28, 2019

Thank you for the response.  I was hoping there would be away to alter the users preferences but that didn't really make sense.  Our team will have to decide if its worth increase the size of the font to increase the readability of the pdf.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2019 Jan 28, 2019

I don't understand the problem. If things are too small, why not just zoom?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 28, 2019 Jan 28, 2019

Our team was trying to avoid having the user zoom in.  I agree I would just zoom in as well.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2019 Jan 28, 2019

So, why not zoom in for the user? Or set the document open options so they don't have to?

I don't quite follow the path from this problem which led you to wanting to edit Preferences?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 28, 2019 Jan 28, 2019

Are you saying there is a method I can use to set the zoom factor for the user?  I would like for when the user opens the pdf its set to the zoom factor that was established when the macro executed said code.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 28, 2019 Jan 28, 2019

I am using Excel VBA to create the pdf, so Ideally I wanted the zoom to be set at the time the pdf is created.  So, when the user opens the pdf the zoom is set to the value that was used at the time of creation.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2019 Jan 28, 2019

AVPageViewZoomTo may be your friend.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 28, 2019 Jan 28, 2019

Its funny you mention that method. The original code I had was using this method.  I would open the document and then zoom in and save the document.  I found the snippet online and some minor modifications to zoom in. The problem is the pdf when saved doesn't retain the zoom in factor. 

Dim AcroApp As CAcroApp

Dim AVDoc As CAcroAVDoc

Dim PDDoc As CAcroPDDoc

Dim PPageView As CAcroAVPageView

Set AcroApp = CreateObject("AcroExch.App")

Set AVDoc = CreateObject("AcroExch.AVDoc")

pdfFileName = "C:\Users\csmith\Desktop\Metrics\Commercial Quote Builder.pdf"

Call AVDoc.Open(pdfFileName, "")

Set AVDoc = AcroApp.GetActiveDoc

If AVDoc.IsValid Then

    Set PDDoc = AVDoc.GetPDDoc

    Set PPageView = AVDoc.GetAVPageView

    PPageView.ZoomTo 4, 1

    PDDoc.Save PDSaveFull, "C:\Users\csmith\Desktop\Metrics\Commercial Quote Builder.pdf"

    PDDoc.Close

   

End If

'Close the PDF

AVDoc.Close True

AcroApp.Exit

'Cleanup

Set PPageView = Nothing

Set PDDoc = Nothing

Set AVDoc = Nothing

Set AcroApp = Nothing

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 28, 2019 Jan 28, 2019

No, it wouldn't. It just zooms. Have you considered the "Restore last view settings when reopening documents" preference, if that is acceptable to your users (remember, if they reopen the PDF it will open it not where you closed it but where THEY closed it).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 28, 2019 Jan 28, 2019
LATEST

I talked to the person that requested this and they're ok with fixing the zoom.  In the future, I will work on making the size of objects on the page dynamic based on the amount of content so we don't have empty space. The solution doesn't account for the size of the content so we have the font size set to a small size so we don't have objects overlapping.  I appreciate your help today .

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines