Re: I get the drawing "in my face" when i double click referencing... :)

Morganol wrote:

No i meant update the roadmap with the xref ideas i described and Josua responded he have already thought about:

§ master&slave elements xref clickable ( like folio referencing links are )

§ all links also clickable in exported pdf

SEE Electrical do that and when you click on element, it's open internet page with information about materiel : it's very convenient.

Re: I get the drawing "in my face" when i double click referencing... :)

galexis wrote:

SEE Electrical do that and when you click on element, it's open internet page with information about materiel : it's very convenient.

See my videos, you could add manualhy link to open a local or distant documentation pdf, image etc.
I have tried internal link or PDF anchors known as "named destinations" is work but the problem is it open a new pdf viewer instance when you click on the link into exported pdf and not go directly to link in the same PDF.

After perhaps learn in futur to add a HTML tag in element editor, or translate element information label or comment to support HTML link.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

http://www.qtcentre.org/threads/6467-QP … p-amp-Link

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

Thanks for thinking about it nomicons/smile

Re: I get the drawing "in my face" when i double click referencing... :)

https://bugreports.qt.io/browse/QTBUG-12035
https://bugreports.qt.io/browse/QTBUG-83458

Maybe QWebEnginePage::printToPdf.
https://forum.qt.io/topic/83480/qt-5-9- … -documents

I saw that with LO writer or maybe MS World you can edit a PDF QET file and add internal link page anchors, without depending on where the PDF is stored...
For a large project with 200 folios, it is very complicated to do this manually...

https://www.easepdf.com/topics/add-link-to-pdf.html

https://www.sejda.com/pdf-editor

Add links to PDF and edit existing hyperlinks
Add new links to web URLs or pages in the document. Easily edit existing hyperlinks in the PDF.

https://www.sejda.com/images/pages/pdf-editor/add-hyperlink-to-pdf.gif

Hacks to be continued ..

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

Example report link to page.

Post's attachments

Attachment icon affuteuse_250h.pdf 221.17 kb, 247 downloads since 2022-04-15 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

Morganol wrote:

Sorry for late reply.
No, my simple idea is not to export it using another program, and maybe not making changes in QET either.

The simple idea is that by making QET printing links so they visually looks like links, then i guess it is relatively simple to create a small separate program that parse the pdf and rewrites the links so they actually work like links.

Example: if i in xref and folio referencing settings fields put %F@%f%l%c,
then i will for folio "Pump", page 2, coordinate C7 get:  Pump@2C7

If i enter such formatting in my example drawing from my post https://qelectrotech.org/forum/viewtopi … 5577#p5577 , it looks like the following screen-shot, and it also displays like that when opening the exported pdf.

Now if we had a small program that can process that pdf and make the links coma alive it would be great.  the only thin i want it to do is find the number between the @ and a following alphabetical character and make a link of that to the page of that number.

OK the above is simplified, to make it work reliably we probably need a more reliable trigger than a one character "@"....

But we do not want a long trigger string to be shown at link in normal shema in QET nor printing to printer from QET.Having no idea how QET works, i can just say maybe it can temporarily automatically append "LINKME@" plus page number to every xref and folio ref formula just when printing to pdf.

The external program then scans for "LINKME@" and read the page number after it to create the link target, and remove "LINKME@" and the number from the visual part.

That will be compatible with any form of ref formula the user have chosen.
Except, user can nowhere write "LINKME@" but that is very little chance...

Maybe the external program, could even be an integrated part of QET, run automatically directly after initial file is exported, or even streamed so the first version of pdf never is externally written out.




Add Internal link with QET advanced text editor like <a href="#page=10"> work weel but you need only to open this PDF document with Google Chrome,
example with invisible text for link #page=10 on page 100 to go to page 10

<html><head/><body><p><a href="#page=10"><span style=" font-family:'Sans Serif'; font-size:9pt; text-decoration: underline; color:transparent;">10</span></a></p></body></html>

A possible hack is to use python library to open an PDF file generated by QET ..  https://pythonguides.com/pdffilewriter-python-examples/

https://stackoverflow.com/questions/633 … ink-to-pdf

https://stackoverflow.com/questions/287 … nks-in-pdf

Link annotations in PDF documents are associated with a geometric region of a page rather than a particular object in a content stream. For this reason, link annotations alone are not useful for users with visual impairments, or to applications that must determine which content can be activated to invoke a hypertext link.

Tagged PDF /Link elements use PDF's logical structure to establish the association between content items and link annotations, providing functionality comparable to HTML hypertext links.

In HTML, the following example produces text containing a hypertext link:

Here is some text <a href="https://www.w3.org/WAI/"> with a link </a> inside.
In PDF the page must be painted first and then a link annotation placed over the area where the object action will occur.

The following code fragment shows PDF equivalent to the HTML above; it uses link text displayed in blue and underlined. A second code fragment follows, indicating the associated logical structure hierarchy. This is typically accomplished by an authoring tool.

 /P <</MCID 0>>                                                %Marked Content Sequence 0 (paragraph)
  BDC                                                          %Begin marked content sequence
   BT                                                          %Begin text object
    /F1 11.04 Tf                                               %set text font and size
    1 0 0 1 72.024 709.54 Tm                                   %set text matrix
    0 g                                                        %set non stroking color to black
    0 G                                                        %set stroke color to black
   [(H)3(ere )-4(is s)10(o)5(m)-4(e)9( t)-3(e)9(xt)-3( )] TJ   %Show text preceding the link" Here is some text"
   ET                                                          %end text object
  EMC                                                          %end marked content sequence
 
 /Span <</MCID 1>>                                             %Marked Content Sequence 1 (underlined link text)
  BDC                                                          %Begin marked content sequence
   BT                                                          %Begin text object
    1 0 0 1 152.42 709.54 Tm                                   %set text matrix
    0 0 1 rg                                                   %set non-stroking color to blue
    0 0 1 RG                                                   %set stroke color to blue
    [(with a )-2(li)3(n)14(k)] TJ                              %Show link text " with a link"
   ET                                                          %end text object
    0 0 1 rg                                                   %set stroke color to blue
    152.42 707.62 45.984 0.72 re                               %rectangle operator - target area for the link
    f*                                                         %fill the path using the even-odd rule
  EMC                                                          %end marked content sequence
 
 /P <</MCID 2>>                                                %Marked Content Sequence 2 (paragraph)
  BDC                                                          %Begin marked content sequence
   BT                                                          %begin text object
    1 0 0 1 198.41 709.54 Tm                                   %set text matrix                                            
    0 g                                                        %set non stroking color to black
    0 G                                                        %set stroke color to black
    [( )] TJ                                                   %empty text string showing white space
   ET                                                          %end text object
   BT                                                          %begin text object
    1 0 0 1 200.93 709.54 Tm                                   %set text matrix
    [(in)5(sid)5(e.)] TJ                                       %show text following the link "inside."
   ET                                                          %end text
   BT                                                          %begin text object
    1 0 0 1 229.97 709.54 Tm                                   %set text matrix
    [( )] TJ                                                   %empty text string showing white space
   ET                                                          %end text object
  EMC                                                          %end marked content sequence 
  
The following code fragment is an excerpt from the logical structure that establishes the association between the content items and the link annotation:

 11 0 obj                                              %Object ID 11, generation   0, obj keyword
  <</K[1                                               %immediate child of the structure tree root
   <<
    /Obj 26 0 R                                        %reference to Object 26
    /Type/OBJR                                         %this object describes an indirect object reference
   >>]
    /P 12 0 R
    /Pg 17 0 R
    /S/Link
  >>
 endobj
 
 26 0 obj                                              %object ID 26 which is referenced by the OBJR in Object 11
  <</A 31 0 R
   /BS
   <</S/S
     /Type/Border
     /W 0
   >>
   /Border[0 0 0]                                      %a colorless border
   /H/I
   /Rect[150.128 694.558 200.551 720.0]                %the boundaries defining target area where link annotation is active
   /StructParent 1
   /Type/Annot                                         %Structure element is an annotation
   /Subtype/Link
  >>                                                   %It is a link annotation                                                 
 endobj     
 31 0 obj                                              %Object 31, gen 0, obj
  <</S/URI                                             %Object type is URI action
    /URI(https://www.w3.org/WAI)                        %The Uniform resource identifier to resolve
  >>   
 endobj

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

Hello,

The QPdfLink class was launched in Qt6.4 with support for a link between a region on a page (such as a hyperlink or a search result) and a destination (page, location on the page, and zoom level at which to view it).
https://doc.qt.io/qt-6/qpdflink.html#details

I wouldn't know how to implement it but the functionality of having the links within the pdf and all work in Acrobat would be much appreciated

Re: I get the drawing "in my face" when i double click referencing... :)

hello,

as I saw it 's only a PDF viewer in C++ Qt not for writing a PDF document.. and it 's also ported to Qt 5 since Qt 5.15.10.. 11
https://www.qt.io/blog/commercial-lts-q … 0-released

Hi, the universal binaries for qtpdf (and qtwebengine) will be provided in 5.15.11. In 5.15.10, you can build those from sources. Br, Tarja Sundqvist / Release manager


Handling PDF:
https://wiki.qt.io/Handling_PDF#:~:text … to%2Ffile.

QET use QPrinter::PdfFormat method:

Using QPrinter
For creating PDF documents from scratch, you can use Qt's built-in print support which also allows "printing" to PDF files. To do so you can set up a QPrinter instance like this: QPrinter printer(QPrinter::HighResolution); printer.setOutputFormat(QPrinter::PdfFormat); printer.setOutputFileName("path/to/file.pdf"); Since QPrinter inherits QPaintDevice, anything that supports outputting graphical content to a QPaintDevice (or has convenience API for printing with QPrinter) can thus be used for generating PDFs:

Better way:
The Scribe Framework
https://wiki.qt.io/Handling_Document_Formats

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

Maybe we can use Qtwebengine html document to pdf?, but is very horrible to add this dependency in our toolchain for packaging, like with cross compile for windows with MXE or in macOS bundle:
https://doc.qt.io/qt-6/qtwebengine-webe … ample.html

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."

Re: I get the drawing "in my face" when i double click referencing... :)

WHEN THE QELETROTECH FILE IS EXPORTED TO PDF, I DOUBLE CLICK ON THE REFERENCE TO TAKE ME TO ANOTHER REFERENCE POINT BUT IT DOESN'T WORK IN PDF, BUT WITHIN QELETROTECH WHEN I'M MAKING THE CROSS REFERENCE IT WORKS, IT JUST DOESN'T WHEN IT IS SPORTED TO PDF.
INSIDE THE PDF FILE CROSS REFERENCES WHEN I CLICK TWICE DOES NOT TAKE ME WHERE I WANT.

Observation.
IS THERE ANY POSSIBILITY THAT WHEN EXPORTING QELETROTECH TO PDF I CAN SEE CROSS REFERENCES IN THE SAME WAY AS IN THE QELETROTECH PROGRAM?

The best explanation is in this video

https://youtu.be/BfC0wIeTCnI?si=39H7ew08QWTZ_Lr0

Re: I get the drawing "in my face" when i double click referencing... :)

jari wrote:

WHEN THE QELETROTECH FILE IS EXPORTED TO PDF, I DOUBLE CLICK ON THE REFERENCE TO TAKE ME TO ANOTHER REFERENCE POINT BUT IT DOESN'T WORK IN PDF, BUT WITHIN QELETROTECH WHEN I'M MAKING THE CROSS REFERENCE IT WORKS, IT JUST DOESN'T WHEN IT IS SPORTED TO PDF.
INSIDE THE PDF FILE CROSS REFERENCES WHEN I CLICK TWICE DOES NOT TAKE ME WHERE I WANT.

Observation.
IS THERE ANY POSSIBILITY THAT WHEN EXPORTING QELETROTECH TO PDF I CAN SEE CROSS REFERENCES IN THE SAME WAY AS IN THE QELETROTECH PROGRAM?

The best explanation is in this video

https://youtu.be/BfC0wIeTCnI?si=39H7ew08QWTZ_Lr0

QET don't do that at this moment.

Re: I get the drawing "in my face" when i double click referencing... :)

thanks my brother
All good.
We are waiting for the next update with this PDF cross-reference function

Re: I get the drawing "in my face" when i double click referencing... :)

jari wrote:

thanks my brother
All good.
We are waiting for the next update with this PDF cross-reference function

Many users want it, but there are not enough developers for it. In addition, the team has not been working on QET for some time for medical reasons.

Re: I get the drawing "in my face" when i double click referencing... :)

Hey guys,

Just a quick ping on this one? Any light at the end of the tunnel?

This is indeed one of the most desired functionalities!

Thank you