Page 1 of 1

Use GdViewer with PDF and Previewing Image Clean up

Posted: Sat Mar 21, 2020 1:59 pm
by tfierens1
Hi,

I'm trying to modify one of your sample (..\GdPicture.NET 14\Samples\WinForm\C#\OCR\OCR.sln) to handle multiple pages and process the currently open page from my PDF but currently it only displays one page and when right clicking on the viewer, the navigation menu is disabled as it is only load one page from a multi-page pdf.

What I want to achieve is, process the currently open page and use the navigation context menu to go from one page to the other but to no avail. If I use the GdViewer.LoadFromFile which enables the navigation menu and after a bit of tweaking, it appears to be processing the currently opened page but it is no longer updating the preview after applying a filter such as treshold.

Can you explain how do I sync the viewer with the GdPicturePDF so that both the navigation and the previewing of the "image" of the currently pdf page displayed is updated accordingly.

Thanks.

Re: Use GdViewer with PDF and Previewing Image Clean up

Posted: Fri May 22, 2020 3:50 pm
by Hugo
Hi there,

You have multiple methods in our GdViewer class to update/refresh the displayed page.
https://www.gdpicture.com/guides/gdpicture/Gd ... edraw.html

If you are using GdPicturePDF or GdPictureImaging to modify your document you will need to use the following methods to preview your pages in our viewer:
https://www.gdpicture.com/guides/gdpicture/Gd ... rePDF.html
or
https://www.gdpicture.com/guides/gdpicture/Gd ... Image.html

Unless you have saved the document locally with the applied modifications to the document, GdViewer.LoadFromFile will simply display the document you passed to it.

Let me know if this helps.

Regards,
Hugo Cudd
Technical Support