rotate pdf and scrolling with hand tool

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

rotate pdf and scrolling with hand tool

Post by zbarna »

Hi!

I downloaded the trial version of the PDF-XChange Tools SDK, and tried the example, where I can open pdf files, zooming, scrolling, ... (PXCView36).

In this example I can zoom only with the mouse scroll, or with the scrollbars. Is it possible to change it and switch the cursor to the hand tool, and I can scroll with dragging the mouse cursor?

Second question, is it possible somehow, to rotate the documentation, or change the orientation of the pdf document?

Thanks for your help in advance!

BR,
Zoli
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: rotate pdf and scrolling with hand tool

Post by John - Tracker Supp »

Hi,

The PXCView36 dll offers a simple rasterized representation of your PDF pages and I believe the example does show some simple controls being added such as zoom etc - but essentially the simple dll version (thats what this is) is designed to present a blank canvas as far as PDF viewing and the UI experience is concerned and leaves the create and UI elements to you to code and design - for your own needs and expectations.

If you are looking for a feature rich user interface - then download and try the ActiveX version - which will give you and your users all you need and more ...

https://www.pdf-xchange.com/product/downloads/sdk

This also provides a ready way made to rotate pages as required - otherwise you will need to use the XCPRO functions to rotate and re-orientate pages and again examples and methods are provided showing this - see the examples and help file for specific info.

If we can help more do come back - preferabley once you have reviewed the examples and help provided.

thanks
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

Re: rotate pdf and scrolling with hand tool

Post by zbarna »

Thanks for the answer!

Yeah, the blank canvas without menu for pdf viewing is perfect for me.

So my goal is to extend our program with a pdfviewer. I want a window just for viewing the pdf, and I will put some buttons over the window for zooming, for rotating, ... .

So the zooming works well from you example, but I found the rotating function only in the pxclib40.dll .

Unfortunately when I want to import the pxclib40.dll into my program, i get an error:
Unable to load DLL 'pxclib40': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

The dll file is next to the .exe, so I don't understand. Anyway I get the same error when I try to use your other example (PDFXCDemo) .

Could you help what can be the problem?

Thanks in advance!

BR,
Zoli
User avatar
John - Tracker Supp
Site Admin
Posts: 5219
Joined: Tue Jun 29, 2004 10:34 am
Location: United Kingdom
Contact:

Re: rotate pdf and scrolling with hand tool

Post by John - Tracker Supp »

Hi,

Just for future ref, all pxclib40 functions are valid when creating/writing new files and xcpr4o functions when dealing with existing pdf files - the function I believe you need is :

PXCp_PageSetRotate

Also there are numerous dll's required to be located with your exe - not just pxclib40 for example - this would requrie several others including XCPRO40 as they are interdependant in some areas - you can view the dependancies list for funcitonality on page 19 of the PDF-Tools SDK PDF manual for full info.

Hope that helps
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

Re: rotate pdf and scrolling with hand tool

Post by zbarna »

Hi!

Thanks for your help, I finished the pdf viewer what I wanted with the trial version of your the PDF-Tools 4 SDK.

Now I rotate the document in the pdfviewer this way:

I load the pdf to the usercontrol, and when the user want to change the orientation, I read the document with the XCPro, set the rotation, then write document, and load it to the usercontrol again. What do you think about this method? Is it okay, or are there any better way to rotate it? Because this way I have to open the pdf again, every time the user rotate it, but it is quite fast I think, but maybe there is better way to do this.

The method for the rotating is this:

Code: Select all

            int m_pdf;
            int res = XCPro40Demo.XCPro35_Defs.PXCp_Init(out m_pdf, XCPro40Demo.XCPro35_Defs.g_RegKey, XCPro40Demo.XCPro35_Defs.g_DevCode);
            res = XCPro40Demo.XCPro35_Defs.PXCp_ReadDocumentW(m_pdf, _pdfPath, 0);

            //Rotate pdf
            int rotation = 0;
            XCPro35_Defs.PXCp_PageGetRotate(m_pdf, _pageNum, out rotation);
            rotation -= 90;
            XCPro35_Defs.PXCp_PageSetRotate(m_pdf, _pageNum, rotation);

            //Write out manipulated pdf
            res = XCPro35_Defs.PXCp_WriteDocumentW(m_pdf, _pdfPath,
                    XCPro35_Defs.PXCp_CreationDisposition.PXCp_CreationDisposition_Overwrite,
                (int)XCPro35_Defs.PXCp_WriteDocFlag.PXCp_Write_Release);
Second question:

Now I downloaded the cheapest kind of sdk trial version (PDF4-TOOLS SDK), but I used some functions from the XCPRO40 library (for example: PXCp_PageSetRotate), but this library was next to the PDF4-Tools SDK as well. So the cheapest SDK contains these functions or I have to buy the PRO SDK?

Thanks for your help in advance!

Best Regards,
Zoli
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: rotate pdf and scrolling with hand tool

Post by Tracker Supp-Stefan »

Hello Zoli,

what you are doing is permanently rotating the pages - and this might not be necessary if all you want to do is just rotate the View for the user on screen. Please take a look at the PXV_CommonRenderParameters - and you will see how you can control the rotation to be used when rendering a page on yous screen - without any need to actually rotate the page contents or perform write operations. (I am assuming you are using the simple Viewer SDK to render the document for the user - as you mention you are using the PXCView36 demo).

The Tools SDK license allows you to use methods from both PXCLIB40 and XCPRO40 libraries.

The Viewer SDK uses a different licensing model - but a license for the Tools SDK comes with a limited (up to 2500 end users) distribution for the Viewer SDK as well - and is our cheapest SDK package.

Best,
Stefan
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

Re: rotate pdf and scrolling with hand tool

Post by zbarna »

Hi Stefan!

Yes! This PDFViewer SDK is what I exactly need :) .

In this SDK there is a lot of command to hide the toolbars, rotate document, do everything from code!

I test the trial version deeper, and come back soonly!

Thanks for your answer!

BR,
Zoli
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: rotate pdf and scrolling with hand tool

Post by Tracker Supp-Stefan »

Hello zbarna,

If you are using the simple Viewer SDK (the PXCView36 demo) - you will be able to render a PDF page - and then display it for your users in any way you like - with scrolbars or without etc. if you are checking the other ViewerAX SDK demos - there are toolbars and sliders - but you hide all of them and leave just the main rendering window if you like. Please take a look at the Viewer AX demo applications, and the manual/help file that somes with the SDK
(it's located in C:\Program Files\Tracker Software\PDF-XChange Viewer SDK\SDKHelp\PDFV_AX.pdf by default).

Best,
Stefan
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

Re: rotate pdf and scrolling with hand tool

Post by zbarna »

Hi!

Yeah, I'm reading this pdf: PDFV_AX.pdf, which is very useful :) .

But I downloaded this trial version of the PDF-XChange Viewer Simple DLL SDK, and this pdf is for the PDF-XChange Viewer ActiveX SDK, which price is more than double of the PDF-XChange Viewer Simple DLL SDK, isn't it?

So with PDF-XChange Viewer Simple DLL SDK, can I use the these functions which are listed in the PDFV_AX.pdf?

BR,
Zoli
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: rotate pdf and scrolling with hand tool

Post by Tracker Supp-Stefan »

Hello Zoli,

No you can not use the functions listed in the AX manual with the simple DLL SDK - the Simple DLL SDk functions are listed in the PXCView36SSDK_Help.chm file (in the same folder).

Yes the AX SDK is more expensive than the Simple DLL one but please do let us know to how many users you think you will initially distribute your product - and we will see if any of our other SDK products (with limited viewer functionality included) would be better and more cost effective solution in your case.

Best,
Stefan
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

Re: rotate pdf and scrolling with hand tool

Post by zbarna »

Hi!

I'm not sure about how many users will use our program in the company, but I will ask the project manager about this.

One question: What is the main different between the PDF-XChange Viewer Simple DLL SDK and the PDF Tools SDK?

Both of them contains almost the same functions, not?

Thanks!

BR,
Zoli
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: rotate pdf and scrolling with hand tool

Post by Tracker Supp-Stefan »

Hi Zoli,

The PDF Tools SDK is focused on creating and manipulating PDF files (at a lower level and without user intervention) - while the Viewer SDK is focused on displaying and providing tools for annotating existing PDFs and the sets of tools available are mostly different (there might be some features overlapping).

Best,
Stefan
zbarna
User
Posts: 21
Joined: Thu Dec 08, 2011 9:01 am
Location: Budapest

Re: rotate pdf and scrolling with hand tool

Post by zbarna »

Hi!

Thanks for your fast answer again! :)

So with PDF-XChange Viewer Simple DLL SDK I can't use your activex control within our program, but in the PDF-XChange Viewer Simple SDK in the introduction I read this:

"The PDF-XChange Viewer SDK is available as a stand alone Developer kit and also included with our PDF-XChange and PDF-Tools SDK's. The PDF-XChange Viewer offers both a Direct DLL method to create simple PDF viewing within your application or a full ActiveX which allows the use of the full PDF-XChange Viewer within your product."

I downloaded the PDF-XChange Viewer Simple DLL SDK trial version as I wrote before, and could you tell me which examples uses only the PDF-XChange Viewer Simple DLL SDK, and not the PDF-XChange Viewer ActiveX SDK, because it's mixed, and I'm not sure which one should I use, when I want to test the PDF-XChange Viewer Simple DLL SDK functions.

Thanks in advance!

BR,
Zoli
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17941
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: rotate pdf and scrolling with hand tool

Post by Tracker Supp-Stefan »

Hello Zoli,

The PXCView36 sample application should be using only the Simple DLL SDK functions.

As for the text you have quoted - it's related to our licensing policy - and means that based on your distribution requirements - you might be able to purchase a license for one of our other SDK products (that are cheaper than the separate Viewer SDK ones) - and get a limited number of distributions for the Viewer SDK. We will be able to point you to the cheapest product for your needs once you get the number of distributions from the project manager.

Best,
Stefan
Post Reply