You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Announcement
Collapse
Forum Guidelines
This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
Hi, I downloaded this program so I could play with the Debenu PDF Library and found the sample code provided caused the DISPLAY OPENFILE command to crash.
I found the global variable DocID in the sample program needed to be changed to avoid the crash. I changed mine to gDocId1 and that seemed to work.
Evidently there must be a conflict with that variable when calling DISPLAY OPENFILE.
The crash occurred sometimes when calling DISPLAY OPENFILE but mostly as soon as the open file dialog closed and the PDFView program started to execute.
To run the compiled program, your own or the one include, you'll also need the "Quick PDF Library DLL" included with the trial demo above.
Code and comments welcome
You're doing some really awesome work here Marc, good work. Building a PDF viewer using PowerBASIC that eveyone can use is going to benefit heaps of people.
Add to the 4th case statement in: CALLBACK FUNCTION OnEvent_Print( ) AS LONG
Code:
[COLOR="Silver"] PrintSel = XPRINT$
END IF[/COLOR]
CONTROL SET TEXT CB.HNDL, %StateLog, GetDocumentInfo( ) ' Update infoscreen
[COLOR="silver"] CASE %PrintPDF [/COLOR]
Add to function: FUNCTION GetDocumentInfo( ) AS STRING
If you want to continue with the PDF Viewer, and I think that would be
a good idea, I have the following suggestion.
Why not change the library version for the activex version.
The new compiler, PbWin9 has everything we always want to use those dll's.
The library version that you are using now, depends on the includefile with is
produced by Rowan.
If he got to few response from the PBasic users, he might stop with producing
this file. And this includefile could have some errors, as we have seen before.
If you want to see how it is done, take a look at my earlier posting about this subject.
If you want to change and need some help, just ask.
The second comment is about my add on for printing.
In this case I use the PBasic printerfunctions. I think this is the fastest and
easiest way to do this job.
On the other hand there is a build in function in QuickPDF to render the page
to a device. It is the same function used to make the preview on the screen.
In that case it is possible to use scaling for the printout, but is this usefull ?
And then there is one small issue to solve, the DPI from the screen is much
lower than the DPI from the printer.
Some calculation must be done to keep the same size.
I have done this already and the results are good, not better.
So if you want to know more, ask again.
PDF View is a PDF viewer for PowerBASIC 9.01. The attached code is 100% DDT and bloat free
The executable is under 50K and the necessary Quick PDF DLL is under 1.5 Meg. The Adobe Reader 8.1.3 folder on my machine weighs in at 195 Meg but then, this project also doesn't have the functionality or features that Adobe Reader 8 has.
The project has been tested with the following files:
Files 1 to 6 all loaded fine and seem to display correctly. File 7 loads fine and displays correctly except for the logo missing from the first page.
File 8 is a challenge. File loading is slow, the first page rendering is slow others are fine. The document has many embedded fonts and none are showing.
Feel free to comment and contribute to the project, I'll open a new topic with the same name in the third-party addons forum.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: