Printing to a pdf printer programmatically

前端 未结 11 1355
慢半拍i
慢半拍i 2021-01-06 15:40

I am trying to print an existing file to PDF programmatically in Visual Basic 2008.

Our current relevant assets are: Visual Studio 2008 Professional Adobe Acrobat Pr

11条回答
  •  旧巷少年郎
    2021-01-06 16:22

    The big takeaway point here is that PDF IS HARD. If there is anything you can do to avoid creating or editing PDF documents directly, I strongly advise that you do so. It sounds like what you actually want is a batch SNP to PDF converter. You can probably do this with an off-the-shelf product, without even opening Visual Studio at all. Somebody mentioned Adobe Distiller Server -- check your docs for Acrobat, I know it comes with basic Distiller, and you may be able to set up Distiller to run in a similar mode, where it watches Directory A and spits out PDF versions of any files that show up in Directory B.

    An alternative: since you're working with Access snapshots, you might be better off writing a VBA script that iterates through all the SNPs in a directory and prints them to the installed PDF printer.

    ETA: if you need to specify the output of the PDF printer, that might be harder. I'd suggest having the PDF distiller configured to output to a temp directory, so you can print one, move the result, then print another, and so on.

提交回复
热议问题