printURL() in Querformat

 Hallo,

 

ich bin auf der Suche nach einer Möglichkeit eine Webseite mit Hilfe der cprintURL() Funktion im Querformat zu Drucken.

Mein bisheriger Ansatz sieht wie folgt aus:

            clsPDFCreator creator = new clsPDFCreator();

            string parameters = "/NoProcessingAtStartup";

            creator.cStart(parameters, false);

            clsPDFCreatorOptions opt = creator.cOptions;

            opt.UseAutosave = 1;

            opt.UseAutosaveDirectory = 1;

            opt.AutosaveDirectory = @"C:\\";

            opt.AutosaveFormat = 0;

            opt.AutosaveFilename = "BigTest.pdf";

            creator.cOptions = opt;

            creator.cClearCache();

            creator.cPrintURL(@"www.google.de");

            creator.cPrinterStop = false;

 

Also wenn jemand eine Möglichkeit weiß wie ich das Blatt quer bekomme würde ich mich über eine Antwort sehr freuen.

 

Viele Grüße,

Daniel

Hallo,

das wird so nicht funktionieren, weil die cPrintURL-Funktion im Hintergrund den Browser zum Drucken nutzt und dort dann das Querformat eingestellt werden müsste.

Die Funktion ist aber sehr einfach:

```

Dim web As InternetExplorer
Set web = New InternetExplorer
web.Navigate2 URL
Do Until web.ReadyState = READYSTATE_COMPLETE
Sleep 100
DoEvents
Loop
Sleep 2000
If (web.QueryStatusWB(OLECMDID_PRINT) And OLECMDF_ENABLED) = OLECMDF_ENABLED Then
web.ExecWB OLECMDID.OLECMDID_PRINT, OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, PRINT_WAITFORCOMPLETION
End If
web.Quit
Set web = Nothing

<p>Dort das Seitenformat anzupassen dürfte nicht all zu schwer sein.</p><p>Viele Grüße,<br />Philip</p>