Hope all is well.
I just have a query about printing to pdf.
Basically, we moved from Net Express to Visual Studio 2010 a short while ago. Some of our programs stayed as native code. One of these prints to an Adobe pdf file using Courier New font but with mixed font sizes. The program worked fine in Net Express but is terribly slow to run in Visual Studio. What took a minute or two on the old system is taking 20 minutes in Visual Studio.
The issue is definitely due to the font size as changing everything to print the same font size means the Visual Studio program runs fine. It's not ideal if we have to do that which is why I was wondering if anyone knows of a solution? Many thanks if you can help!
Another thing I noticed with pdf printing in Visual Studio is blank line spacing seems to be greater than in Net Express, causing our report lines to "creep" down the page. It meant I had to adjust the page overflow lines. Again, I didn't expect to have to do that after porting the code to Visual Studio.
The lines below are an example of the native code we are using to handle printing. The first part is where we are setting the font size and family. We are printing to Adobe Acrobat 8.
CALL "PC_PRINTER_SET_FONT" USING BY REFERENCE WS-HANDLE
BY REFERENCE WS-FONT-FAMILY
BY VALUE WS-FONT-SIZE
BY VALUE WS-FONT-STYLE
IF WS-STATUS-CODE NOT = 0
MOVE "UNABLE TO SET PRINTER FONT" TO LINK-MESSAGE
GO TO PX999.
CALL "PC_PRINTER_WRITE" USING BY REFERENCE WS-HANDLE
BY REFERENCE WS-PRINT-BUFFER
BY VALUE WS-PRINT-BUFFER-LEN
Many thanks if you have any ideas of what to do. I tried looking at whether a Namespace needs to be added (or COM object), plus searched high and low on Google without any hits.