<div dir="ltr"><div dir="ltr"><div>I want to know the details about the printing job workflow.<br></div><div><br></div><div>Currently, I found this site to talk about the printing workflow :</div><div><a href="https://wiki.openoffice.org/wiki/Mac_OS_X_Porting_-_Native_Printing">https://wiki.openoffice.org/wiki/Mac_OS_X_Porting_-_Native_Printing</a><br></div><div><br></div><div>I want to know How does step 3 (as picture Pringting_model) work?</div><div>Does it use any Linux system call or API?</div><div><br></div><div>I focus on the genprnpsp.cxx and try to understand the full workflow about printing.</div><div>In EndJob function, it has call the createPDF(), then createPDF() call the passFileToCommand(), I can't find any file that how calling this function ( all about in genprnpsp.cxx ) in sw folder, so I don't know what the parameter "rCommand" actually do. </div><div><br></div><div>Hope somebody can answer this question.</div><div><br></div><div>==========================================</div><div><br></div><div>Maybe some developers understand the Chinese, so I describe more complete in Chinese.</div><div><br></div><div><p style="margin:0px 0px 6px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px">不知道有沒有人了解 LibreOffice 將列印工作傳遞給系統時作了什麼動作?</p><p style="margin:0px 0px 6px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px">經過有點長時間搜尋的過程仍沒有太大的了解,發問在 askLibreOffice 和 IRC 目前也沒有收到任何回答,於是想問問看這裡。</p><p style="margin:0px 0px 6px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px"><br>像是列印過程中 ( 由 LibreOffice 丟工作給外部 Printer 間的這個過程 ) 使用了什麼 API 或是 System call,也就是在 setPrinterInfo 以及 Print start job 之後,是如何進行列印或輸出成 PDF 的。</p><p style="margin:0px 0px 6px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px"><br></p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px">目前針對列印部分 PspSalPrinter看了 source code ,但透過 visual studio 的檢視呼叫階層找不到呼叫這些 function 的程式。看了 SW 內的程式也還沒有看到跟 PspSalPrinter相關的呼叫。</p><p style="margin:6px 0px;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px"><br></p><div class="gmail-text_exposed_show" style="display:inline;font-family:Helvetica,Arial,sans-serif;color:rgb(29,33,41);font-size:15px"><p style="margin:0px 0px 6px;font-family:inherit">找了一段時間找到了一篇比較仔細的列印說明,但內容上沒有到很深入,下面附上連結:<a href="https://l.facebook.com/l.php?u=https%3A%2F%2Fwiki.openoffice.org%2Fwiki%2FMac_OS_X_Porting_-_Native_Printing%3Ffbclid%3DIwAR0IMrSnbghNzS1mkxku7oO37SHEkHEjlMjAXZd_3XokZX-lI8krwNlk1Aw&h=AT3uCc68DyjXIqhy_QbJWLfu7TlVJoKIpzWrZJ9SflJrkVUekymRl9ga8aYa-XNyfi7vTlNAlGaXZHkeLxinYRs8JhLseabxgHg-yyZygIbU-AwMyz8o2pdjgswNhygB5xXNCT26IhafW0rnB6QqxgrD" target="_blank" rel="noopener nofollow" style="color:rgb(54,88,153);text-decoration-line:none;font-family:inherit">https://wiki.openoffice.org/…/Mac_OS_X_Porting_-_Native_Pri…</a></p><p style="margin:6px 0px;font-family:inherit">看了他的附圖 Print_model 我想我是想要知道關於第三步驟的詳細作法,也就是經由 svtool 取得使用者想要的列印設定並且準備就緒時,真正呼叫 VCL PspSalPrinter 的部分:</p><p style="margin:6px 0px;font-family:inherit"><br></p><p style="margin:6px 0px;font-family:inherit">(3) "The user application has now everything needed to print the document. So, it asks VCL to draw pixels, lines, characters, etc on an OutputDevice.</p><p style="margin:6px 0px;font-family:inherit">At this point, I don't know exactly where the OutputDevice is instancied (who decides that it would be a screen, an Aqua printer or a PostScript printer. This is not really important since we understand the main idea of how printing works."</p><p style="margin:6px 0px;font-family:inherit"><br></p><p style="margin:6px 0px;font-family:inherit">但看了 PspSalPrinter 相關的程式碼之後感覺還是沒有真正接觸到系統的呼叫,雖說有找到 createPDF 函式下的 passFileToCommand,但因為程式無法成功 build 起來因此無法確定它其中傳遞的參數裡的指令是做了什麼事。</p><p style="margin:6px 0px;font-family:inherit"><br></p><p style="margin:6px 0px;font-family:inherit">不知道是否有人對這一方面有了解呢?</p></div></div></div></div>